Hey i have a question about the On Error statement...
so my code is
[VBA]
Global off1(1 To 10) As Date
Global work1(1 To 10), enddate As Date
Global daysworked As Integer
Global daysoff As Integer
Global mont As Integer
Global startdate As String
Global days(1 To 31) As Integer
Global daysinmonth(1 To 31)
Sub calender()
On Error GoTo 1
result = MsgBox("Did you wish to fill this Date column automcatically", vbYesNo)
If result = vbYes Then
' a bunch of stuff in here
' then after the if statement i have
End If
1: MsgBox ("An error occured.")
End Sub
[/VBA]
so when i run the macro if i dont satify that first if statement then it should just close the program and not run the error message. But for some reason it always runs that error message, it seems that once it sees that code it shows the msgbox even if there has not been an error...
Please help..