Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving file with date variable


Hi All

Hopefully just a quick question :

I am trying to save a file as a .csv. See below code:

Code:
--------------------
fileSaveName = Application.GetSaveAsFilename("C:\Documents and Settings\My Documents\Testing\excel\" & empinput, fileFilter:="CSV Files (*.csv), *.csv")
--------------------


empinput is a variable which works fine, at the end of the filename
though i need the current month inserted in mm format

i.e. 22208 'if empinput = 222
can anyone help me with this ??

Thanks in advance!!


--
Steel Monkey
------------------------------------------------------------------------
Steel Monkey's Profile: http://www.excelforum.com/member.php...o&userid=29051
View this thread: http://www.excelforum.com/showthread...hreadid=572173

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving file with date variable


Problem solved. In case any one is wondering here i got the current
month as something i could use.


Code:
--------------------
Dim mystr
mystr = Format(Date, "mm")
--------------------


then just used this:

Code:
--------------------
fileSaveName = Application.GetSaveAsFilename("C:\Documents and Settings\My Documents\Testing\excel\" & empinput & mystr, fileFilter:="CSV Files (*.csv), *.csv")
--------------------


Steel Monkey


--
Steel Monkey
------------------------------------------------------------------------
Steel Monkey's Profile: http://www.excelforum.com/member.php...o&userid=29051
View this thread: http://www.excelforum.com/showthread...hreadid=572173

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
saving a file with a date pat67 Excel Worksheet Functions 3 October 8th 09 08:39 PM
Saving as variable file name leerem Excel Discussion (Misc queries) 1 September 29th 08 10:30 AM
Saving worksheet in new file with date AND cell value as file name michaelberrier Excel Discussion (Misc queries) 4 May 26th 06 08:05 PM
Saving file with date on it mehta_agm[_2_] Excel Programming 2 January 18th 06 06:35 AM
Saving Registry variable to ini file Allen[_3_] Excel Programming 0 September 10th 03 06:14 PM


All times are GMT +1. The time now is 06:30 AM.

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

About Us

"It's about Microsoft Excel"