Hi Falks,
I have written a code in workbook module in a file with Workbook_Open activity and I am receiving the below error while I am opening the file from sent email or sometimes from main file.
Can anyone help me to resolve the below error
------------------------------------------------------
Run-time error '1004':
Activate method of worksheet class failed
------------------------------------------------------
I have written a code in workbook module in a file with Workbook_Open activity and I am receiving the below error while I am opening the file from sent email or sometimes from main file.
Can anyone help me to resolve the below error
------------------------------------------------------
Run-time error '1004':
Activate method of worksheet class failed
------------------------------------------------------
Code:
Private Sub Workbook_Open()
'Runs after Workbook is opened to unhide data sheets
'Step 1: Ensure that START sheet is visible
Sheets("START").Visible = xlSheetVisible
'Step 2: Hide all other workSheets
Sheets("Form_Input").Visible = xlVeryHidden
Sheets("Form").Visible = xlVeryHidden
Sheets("Collation").Visible = xlVeryHidden
ThisWorkbook.Sheets("START").Activate
Range("F9").Select
Range("F9").ClearContents
End Sub