Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Command Button to Save As Workbook...

no takers huh?

Thanks :

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open a Workbook using a Command Button aussiegirlone Excel Discussion (Misc queries) 2 April 7th 09 03:56 AM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
Command Button Prompt Save As? Rich Excel Discussion (Misc queries) 3 May 17th 06 02:33 PM
How to create command button to save the dates and time Ken Vo Excel Discussion (Misc queries) 6 January 5th 06 04:18 AM
Command Button crashing workbook? Kaval Excel Discussion (Misc queries) 1 July 15th 05 12:12 AM


All times are GMT +1. The time now is 02:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"