Hi, I'm getting an error that says 'Run Tim Error 429 - Active x component can't create an object' when I switch tabs in a worksheet.
The tab I'm on is called "Page 1" but when I click out of that tab, then go back to it, I get the run time error and the code stops at the line that says "Set wb = ThisWorkbook"
I've pasted a sample of the code below - does anyone know why this would happen?
The tab I'm on is called "Page 1" but when I click out of that tab, then go back to it, I get the run time error and the code stops at the line that says "Set wb = ThisWorkbook"
I've pasted a sample of the code below - does anyone know why this would happen?
VBA Code:
Option Explicit
Private Sub Worksheet_Activate2()
Dim wb As Workbook
Dim sh As Worksheet
Dim sh2 As Worksheet
Set wb = ThisWorkbook
Set sh = wb.Sheets("Page 1")
End Sub