Showing related tags and posts accross the entire site.
-
Xania Adding to Bob's reply, if you enter Option Explicit At the top of each module, you will be forced to declare all variable (or get an error). This may have guided you in this one. You can force the VBE to add this automatically by setting 'Require variable declaration' under Tools>options...
-
Hi Anonymous! This is how I would add a new worksheet and attach the "Calulate" event handler (the example shows a message box each time the calculate event is triggered): Private Sub NewSheet_Click() Dim oXl As Application: Set oXl = Application oXl.EnableEvents = False oXl.DisplayAlerts ...