Thread: Drop xls ext
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
PraxisPete PraxisPete is offline
external usenet poster
 
Posts: 25
Default Drop xls ext

Hi Everybody, still trying to learn VB, but I can not find the answer to this.
My macro opens a .xls file and then afterwards saves it as a .csv, the
variable f has the File Name including the ext .xls, when saved I end up with
MyFile.xls.csv
How can I lose the xls ext?

Code Used

F = Application.GetOpenFilename("XL Files (*.xl*), *.XL*")
If F = False Then Exit Sub
Workbooks.Open F

ActiveWorkbook.SaveAs FileName:= _
"C:\...\" & F & ".csv", FileFormat _
:=xlCSV,

Many Thanks in anticipation