Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Guys,
I'm looking for a line of code to add into a macro that will save the open workbook (lets call it workbook1) in the format of Filename_1 e.g. Workbook_1 I'm sure its simple but I'm having a blank. Thanks! Dave |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you just want to save the workbook with its current name
(overwriting an earlier version), then try this: Application.DisplayAlerts = False ActiveWorkbook.Save Application.DisplayAlerts = True The Application.DisplayAlerts = False will overwrite without giving you a warning. Alternatively, if you want to save the file with a different name, then try this: ActiveWorkbook.SaveAs Filename:= _ full_path & "Workbook_1.xls", _ FileFormat:=xlNormal, Password:="", _ WriteResPassword:="", _ ReadOnlyRecommended:=False, _ CreateBackup:=False Just one statement - I've split it here to avoid awkward line breaks in the newsgroups. full_path is a string which you should have declared earlier - fairly obvious what it is for. Hope this helps. Pete On Jul 24, 10:30 pm, Dave wrote: Hi Guys, I'm looking for a line of code to add into a macro that will save the open workbook (lets call it workbook1) in the format of Filename_1 e.g. Workbook_1 I'm sure its simple but I'm having a blank. Thanks! Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
Programming "SaveAs" command | Excel Discussion (Misc queries) | |||
Cell("filename") doesn't update to new filename when do save as. | Excel Worksheet Functions | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |