Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I get an error, "Run-time error '1004': Application-defined or object-defined
error" when I run the following macro: Sub Sheet_Names() Dim ws As Worksheet With Worksheets.Add .Name = "Sheet Names" .Move befo=Worksheets(1) End With Sheets("Sheet Names").Activate Range("a1").Activate For Each ws In Worksheets If ws.Name < "Sheet Names" Then ActiveCell.Formula = ws.Name ActiveCell.Offset(1, 0).Select End If Next End Sub What does this error mean and how can I resolve it? The macro is supposed to create a list of tab names in the workbook. Thanks, Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error: "Excel encountered an error and had to remove some formatti | Excel Discussion (Misc queries) | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
I have Error 1919 Error Configuring ODBC dataSource Database | Excel Discussion (Misc queries) | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) |