P
Pierre via OfficeKB.com
Hi,
i have an application with lots of sheets, forms and modules and subs.
with each error i would like the following code to be executed:
private sub error()
With Sheets("waarschuwing")
Dim c As Integer
.Visible = xlSheetVisible
For c = 1 To Sheets.Count
If Sheets(c).Name <> "waarschuwing" Then
Sheets(c).Visible = xlSheetVeryHidden
End If
Next
End With
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
however, the sub is in a module.
I would like to have the on erro goto statement go to this sub in the error
handling module.
How can i do that in VBA?
Thanks,
Pierre
i have an application with lots of sheets, forms and modules and subs.
with each error i would like the following code to be executed:
private sub error()
With Sheets("waarschuwing")
Dim c As Integer
.Visible = xlSheetVisible
For c = 1 To Sheets.Count
If Sheets(c).Name <> "waarschuwing" Then
Sheets(c).Visible = xlSheetVeryHidden
End If
Next
End With
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
however, the sub is in a module.
I would like to have the on erro goto statement go to this sub in the error
handling module.
How can i do that in VBA?
Thanks,
Pierre