RichardElk
New Member
- Joined
- Feb 7, 2014
- Messages
- 8
Hi All,
I have recently upgraded to Excel 2016 from Excel 2010; I had a pretty simple macro in an existing sheet which changes the state of various worksheets from xlveryhidden to xlvisible
When I run the macro in Excel 2016 i get the following error message:
run-time error '-2147417848(80010108)':
Method 'Visible' of object '_Worksheet' failed
When the same code is run in Excel 2010 there is no issue. On a debug in 2016 the offending code is: (the bolded text is where the debug starts)
Sheets("General Overview").Visible = True
Sheets("Center Hi & Low").Visible = True
Sheets("Chart - Directs").Visible = True
Sheets("GENERAL Variance Reports").Visible = True
Sheets("Project Dashboard").Visible = True
None of the sheets are protected and there is a "Navigation & Initialization" sheet which is always visible.
I have also tried changing the code from Sheets("Name").visible to sheet#.visible which results in Excel shutting down.
I have also tried using xlvisible / xlveryhidden rather than simply using True.
Simply using excel 2010 is not an option for me as some of my intended users only have 2016.
Any help would be greatly appreciated.
I have recently upgraded to Excel 2016 from Excel 2010; I had a pretty simple macro in an existing sheet which changes the state of various worksheets from xlveryhidden to xlvisible
When I run the macro in Excel 2016 i get the following error message:
run-time error '-2147417848(80010108)':
Method 'Visible' of object '_Worksheet' failed
When the same code is run in Excel 2010 there is no issue. On a debug in 2016 the offending code is: (the bolded text is where the debug starts)
Sheets("General Overview").Visible = True
Sheets("Center Hi & Low").Visible = True
Sheets("Chart - Directs").Visible = True
Sheets("GENERAL Variance Reports").Visible = True
Sheets("Project Dashboard").Visible = True
None of the sheets are protected and there is a "Navigation & Initialization" sheet which is always visible.
I have also tried changing the code from Sheets("Name").visible to sheet#.visible which results in Excel shutting down.
I have also tried using xlvisible / xlveryhidden rather than simply using True.
Simply using excel 2010 is not an option for me as some of my intended users only have 2016.
Any help would be greatly appreciated.