I am wondering if anyone can shed some light on how having file extensions hidden vs. visible in a folder effects macros run on files in that folder.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
For example, with the target file already open, I get a new file name from the user, then rename and close the file:
<o></o>
<o></o>newcsvfilename = InputBox("Input name for this new CSV file:")
ActiveWorkbook.SaveAs Filename:=newcsvfilename, FileFormat:=xlCSV
Workbooks(newcsvfilename).Close False
<o></o>
This works fine when the folder with the original file in it has file extensions off, but crashes on the last line when file extensions are on. Anyone know why, or how to fix this?
<o></o>
Thanks!
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
For example, with the target file already open, I get a new file name from the user, then rename and close the file:
<o></o>
<o></o>newcsvfilename = InputBox("Input name for this new CSV file:")
ActiveWorkbook.SaveAs Filename:=newcsvfilename, FileFormat:=xlCSV
Workbooks(newcsvfilename).Close False
<o></o>
This works fine when the folder with the original file in it has file extensions off, but crashes on the last line when file extensions are on. Anyone know why, or how to fix this?
<o></o>
Thanks!