English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Private Sub ExecuteNames_Click()
'
On Error GoTo Trapit ' this is the line that causes the error
'
' all kinds of well working stuff happening here......
'
End Sub
___________________________

Trapit:
' Intention: if error =13 then run FormatFehler
Exit Sub
End Sub
_________________________

Private Sub FormatFehler()
MsgBox "Date FORMAT must be like 09-SEP-06", vbExclamation, "Auto Payroll"
End Sub

2006-09-04 03:30:40 · 4 answers · asked by Marianna 6 in Computers & Internet Programming & Design

4 answers

The Trapit needs to be a part of the Sub, so change the first End Sub to Exit Sub.

Like So:
Private Sub ExecuteNames_Click()
'
On Error GoTo Trapit ' this is the line that causes the error
'
' all kinds of well working stuff happening here......
'
Exit Sub

Trapit:
' Intention: if error =13 then run FormatFehler
Exit Sub
End Sub


Private Sub FormatFehler()
MsgBox "Date FORMAT must be like 09-SEP-06", vbExclamation, "Auto Payroll"
End Sub

2006-09-04 05:04:22 · answer #1 · answered by f 3 · 1 0

Excel Vba Goto Label

2016-11-07 09:43:12 · answer #2 · answered by ? 4 · 0 0

You Are VBA for Programming. I think you should remove the Line No 7 (End Sub) beacuse VB dosen't Support this use of Label. Though i have checked the program by removing that line. If the problem persists contact me.

Good luck! But don't forgat to thank me.

2006-09-04 03:50:26 · answer #3 · answered by Piyush 2 · 0 0

Boss is in the office, will have to look for links later, but here are a few I love when drunk: Home for a rest (agreed with above poster) F*ck you I'm drunk Kiss my irish ash 1 burbon, 1 scotch, 1 beer Friends in low places B-ee-r Run the F*ck you I'm drunk one is now stuck in my head.... F*ck you I'm drunk F*ck you I'm drunk pour my beer down the sink I've got more in the trunk F*ck you I'm drunk & I'm going to be drunk until the next time I'm drunk... LOL I quit drinking. 5 months sober, now I really want one....music is very powerful, LOL. No, I'm not an alcoholic, but my partner is. Its a supportive quitting.

2016-03-17 01:31:22 · answer #4 · answered by ? 4 · 0 0

fedest.com, questions and answers