In the code below I cannot get the saveas that uses the variable driven
filename to save. It executes without error and the correct value is
shown in the message box and if I use the debugger the correct value is
in the strFilename variable but nothing is saved. However the hardcoded
filename saves fine. Is there anything I might be overlooking in terms
of application settings or anything I am overlooking? I have two
similar verions. It works in one but not the other.
Dim strFilename as String
strFilename = Range("c4") & ".xls"
With ActiveWorkbook
msgbox strFilename
.SaveAs FileName:="C:\Pricing Model\" & strfilename
.SaveAs FileName:="C:\Pricing Model\test.xls"
.Close False
End With
--
chipshot
------------------------------------------------------------------------
chipshot's Profile:
http://www.excelforum.com/member.php...o&userid=27701
View this thread:
http://www.excelforum.com/showthread...hreadid=530964