Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
1004 runtime error
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
1004 runtime error
Try giving explicit reference of the Workbook to the Worksheets collection Something like: Workbooks("1").Worksheets.Count or Thisworkbook.Worksheets.Count -- a7n9 ------------------------------------------------------------------------ a7n9's Profile: http://www.excelforum.com/member.php...o&userid=32149 View this thread: http://www.excelforum.com/showthread...hreadid=562551 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
runtime error 1004 HELP PLS | Excel Discussion (Misc queries) | |||
Runtime Error 1004 | Excel Programming | |||
Runtime Error '1004' | Excel Discussion (Misc queries) | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
Runtime error '1004' | Excel Programming |