Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
file extension
I just upgraded from Office 2000 to Office 2003.
This is the code that I made from 2k version. Sub Make_File() Workbooks(my_book).Sheets("form").Copy Set New_File = Workbooks(Workbooks.Count) New_File.SaveAs Filename:=my_Dir & Sheets(1).Range("A1") New_File.Close End Sub "my_dir" is a string and defined as "D:\test" A1 is also string and includes a period, say A12.34 While it works fine in V. 2K, V. 2003 is not working fine.. The files that are generated from V. 2003 don't have file extension. And I realized that the reason was because there was a period in the cell A1. (if there is no period, it gives me an xls extension). The file name is "A12.34" instead of "A12.34.xls". Is there any structural cure for this instead of manually adding & ".xls" ? thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
file extension
Same thing exists in XL2002 and AFAIK you need to add the extension. XL
will parse the string and read the DP as the name.ext separator. I have not found another way around it. Cheers Nigel "Young-Hwan Choi" wrote in message ... I just upgraded from Office 2000 to Office 2003. This is the code that I made from 2k version. Sub Make_File() Workbooks(my_book).Sheets("form").Copy Set New_File = Workbooks(Workbooks.Count) New_File.SaveAs Filename:=my_Dir & Sheets(1).Range("A1") New_File.Close End Sub "my_dir" is a string and defined as "D:\test" A1 is also string and includes a period, say A12.34 While it works fine in V. 2K, V. 2003 is not working fine.. The files that are generated from V. 2003 don't have file extension. And I realized that the reason was because there was a period in the cell A1. (if there is no period, it gives me an xls extension). The file name is "A12.34" instead of "A12.34.xls". Is there any structural cure for this instead of manually adding & ".xls" ? thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Display file name without the file type extension | Excel Worksheet Functions | |||
Determine Excel file version with no file extension. | Excel Discussion (Misc queries) | |||
file format or file extension is not valid...error message | Excel Discussion (Misc queries) | |||
Additional file with no extension created during File Save As proc | Excel Discussion (Misc queries) | |||
I need to download an exel spreadsheet file. (file extension :xls) | Excel Discussion (Misc queries) |