Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command Button to Save As Workbook...
is there a way that I can get the file name from somewhere in th
workbook...so it says Invoice 1000 for example where the part inserte from the workbook would just be the 1000? That way it woul automatically take care of the naming...then also when it activates th workbook to close, I want it to activate the old workbook, will i automatically recognize the difference or will it require me to tell i that it will be a different name? If I click cancel when it brings u the overwrite file warning a get a runtime error also how can I g about fixing this? This is what I have so far... Private Sub CommandButton2_Click() ' SaveInvoiceThenNewThenCloseOld Macro ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\Owner\My Documents\Synthetic Shiel Invoice5.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Workbooks.Add Template:= _ "C:\Documents and Settings\Owner\Applicatio Data\Microsoft\Templates\Synthetic Shield Invoice.xlt" Windows("Synthetic Shield Invoice5.xls").Activate ActiveWorkbook.Close True End Su -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command Button to Save As Workbook...
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open a Workbook using a Command Button | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Command Button Prompt Save As? | Excel Discussion (Misc queries) | |||
How to create command button to save the dates and time | Excel Discussion (Misc queries) | |||
Command Button crashing workbook? | Excel Discussion (Misc queries) |