W
Waldyd
Hi...
I saved an Excel Application as Microsoft Excel Complement and when i
started the Application, the followin was prompt:
1004 runtime error
Error in 'Worksheets' method of '_Global' Object
Here is the code causing the error
Sub Auto_open()
'Modificacion de la GUI de Excel
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Application.DisplayStatusBar = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Drawing").Visible = False
Application.DisplayFormulaBar = False
For i = 1 To Int(Worksheets.Count) 'This line is causing the error
Worksheets(i).Activate
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
Next i
Sheets(1).Select
Range("A44").Select
ActiveWindow.ScrollRow = 1
I saved an Excel Application as Microsoft Excel Complement and when i
started the Application, the followin was prompt:
1004 runtime error
Error in 'Worksheets' method of '_Global' Object
Here is the code causing the error
Sub Auto_open()
'Modificacion de la GUI de Excel
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Application.DisplayStatusBar = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Drawing").Visible = False
Application.DisplayFormulaBar = False
For i = 1 To Int(Worksheets.Count) 'This line is causing the error
Worksheets(i).Activate
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
Next i
Sheets(1).Select
Range("A44").Select
ActiveWindow.ScrollRow = 1