Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Starting Auto_Close macro based on an IF statement
I'm over my head --
I run an auto_close macro to retrieve and save data collected during a user session. The macro takes all rows with data, copies them to a folder, then clears the collection sheet for next session. If there is NO DATA collected, I want to end the macro right away. Otherwise, I'm getting an error saying Excel can't move things off the worksheet because data may be lost . . . to paraphrase I think it's a runtime error 1004? Here is what I came up w/, but not sure if it's even close -- it doesn't work though. If Sheets("Worksheet") & Range("A3") = "" Then ActiveWorkbook.Save ActiveWorkbook.Close End If Else Workbooks.Open Filename:="W:\. . . Where if A# < "", then I want to run the macro. Any help? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Starting A Macro | Excel Discussion (Misc queries) | |||
starting a macro at startup | Excel Discussion (Misc queries) | |||
Starting a macro with the IF function | Excel Worksheet Functions | |||
How can I assign a range starting cell based on a variable locati. | Excel Discussion (Misc queries) | |||
How can I assign a range starting cell based on a variable locati. | Excel Worksheet Functions |