#1   Report Post  
-Brian-H-
 
Posts: n/a
Default auto create a file


i have a time card in excel that i'd like to automeate a bit more.
right now I have a button on the form to save to a specific file, and
it names the new time card by name, date and job #. something like
"brianh10/14hilton".

people have been asking for copies, and it's tough for me to modify the
code for the button to save to their correct path.

right now mine saves to something like /mydoc's/time/billing/.

Is it possible to code the button so that , if the file doesn't exist,
the code can create the correct path. code is as follows:

Sub Save_As_FileName()
Usr = Range("i5").Value
Dte = Format(Range("l1").Value, "mmddyy")
Pth = "C:\Documents and Settings\brianh\My Documents\otherjobs\Hay
Hill\Time\"
ActiveWorkbook.SaveAs Filename:=Pth & Usr & Dte & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub


--
-Brian-H-


------------------------------------------------------------------------
-Brian-H-'s Profile: http://www.excelforum.com/member.php...fo&userid=5665
View this thread: http://www.excelforum.com/showthread...hreadid=475245

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
Auto save replaced my original file and now I need the original? Hols Excel Discussion (Misc queries) 1 August 15th 05 10:34 PM
Unable to create any link/hyperlinks in a particular excel file Nabanita Excel Discussion (Misc queries) 0 June 21st 05 11:52 AM
auto update xls document from separate file kaplonk Excel Discussion (Misc queries) 2 June 3rd 05 02:37 PM
Why does Excel automatically create a temporary Word archive file. Perplexed Excel Discussion (Misc queries) 3 March 1st 05 06:26 PM
Why does Excel create multiple copies of the same file? TJRUFF Excel Discussion (Misc queries) 2 January 27th 05 08:43 PM


All times are GMT +1. The time now is 12:31 PM.

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"