View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keri keri is offline
external usenet poster
 
Posts: 74
Default 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.