I've got an excel file that, on workbook open, goes to full screen, loses the command bars, status bar, etc. to make it look a bit like a 'standalone' product. I've got some navigation buttons at the time to switch between sheets. Each sheet has a worksheet_activate command to show or hide certain toolbars, etc. for example:
Private Sub Worksheet_Activate()
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayWorkbookTabs = False
.DisplayVerticalScrollBar = True
End With
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("FACT Print").Visible = True
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub
I've had no problems on a number of PCs at my office, but my client's PC is having error messages. When you click to navigate between sheets, sometimes I get "Run time error '1004', unable to set <code line> property of the windows class" but not always on the same button. If I hit debug and delete the code line, I get the same message with the next line.
I added the line 'on error resume next', which stops the error messages, but I'd like to know what the issue is.
Thank you. (sorry for the long winded question !!!)