PDA

View Full Version : Solved: Save as Filename with a variable text



Riaaz66
06-12-2008, 12:31 AM
Hi,

I have a spreadsheet with SQL retreived data, pivots and calculations in it which will be used of weekly and/or monthly base.

Now the question is that I want to have a macro where the file is being saved like "TestFile_[MMMYYYY].xls to a different location then where this sheet is opened from.
Now, the "MMMYYY" can be copied from a cell in that sheet. It should contain the monthNAME and not the monthnumber.

Can sombody help me with the code?


Thanx in advance and kind regards,

Riaaz66

Bob Phillips
06-12-2008, 12:52 AM
Activeworkbook.Saveas "C:\some dir\TestFile_" & Range("A1").Value & ".xls"