Thread: Save file as...
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Save file as...

Hi

Yes both variables should be defined as strings.

Regards,
Per

pgarcia" skrev i meddelelsen
...
Erorr: Variable not defined

Should MyPath be somthing like = Dim Mypath as a string
and MyFileName too?

"Per Jessen" wrote:

Hi

MyPath = "S:\SUPPORT\CADTAR\CMS\!Exported_Text_Files!\"
MyFileName = "d" & Sheets("INPUT_A").Range("A1").Value & "MR"

ActiveWorkbook.SaveAs Filename:=MyPath & MyFileName, _
FileFormat:=xlText, CreateBackup:=False

Regards,
Per

"pgarcia" skrev i meddelelsen
...
Hello all,
I'm looking to save a file as a text delimted file. I have a bit of
code
that reads like so:
ActiveWorkbook.SaveAs Filename:= _
"S:\SUPPORT\CADTAR\CMS\!Exported_Text_Files!\dMR.t xt",
FileFormat:=xlText, _
CreateBackup:=False

However, I need the file to read "d1525mr.txt. So, I need a "d" then
get
1525 number from cell A1, tab INPUT_A and finaly at "MR".

Do able?

Thanks