Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Basic VBA Question
How do I make my macro save my spreadsheet when I run it?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Basic VBA Question
Sub savethesheet()
ActiveWorkbook.SaveAs Filename:="D:\myfiles\Book1.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False End Sub Use this code. Obviously change the path of where you want to save it and the name that you wish to save it as. The way I learned to do these little things was to record a macro while I was doing what I wanted it to do. Which is what I did here - set a macro recording then saved my sheet. Then you can see the code it creates. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Basic VBA Question
Thanks.
keri wrote: Sub savethesheet() ActiveWorkbook.SaveAs Filename:="D:\myfiles\Book1.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False End Sub Use this code. Obviously change the path of where you want to save it and the name that you wish to save it as. The way I learned to do these little things was to record a macro while I was doing what I wanted it to do. Which is what I did here - set a macro recording then saved my sheet. Then you can see the code it creates. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
basic question | New Users to Excel | |||
Basic question...sorry | Excel Worksheet Functions | |||
Basic question | Excel Discussion (Misc queries) | |||
Basic VBA question... | Excel Programming | |||
BASIC VBA QUESTION | Excel Programming |