Two really easy questions
Hi James,
I not using XP but I can assure you the LEFT function is still there.
Your problem may be that the workbook has not been saved before, and
getopenfilename will return nothing.
I'm not real familiar with Word, but you can try
Application.ActiveDocument.Name
--
John
johnf202 at hotmail dot com
"James" wrote in message
...
I have this code in excel (written in excel 97)
MyFile = Application.GetOpenFilename
Myfile2 = Left(MyFile, Len(MyFile) - 2) & "rat"
ActiveWorkbook.SaveAs filename:=Myfile2,
FileFormat:=xlText
There's a bit more in the middle but that is irrelevant,
the two questions I have a
1) now I have upgraded to XP the left function doesn't
work, what can I use instead? (or what reference do I
need to tick)
2) Not really excel, but how do I do the equivalent in
word? (the getopenfilename doesn't work in word).
|