neodjandre
Well-known Member
- Joined
- Nov 29, 2006
- Messages
- 950
- Office Version
- 2019
- Platform
- Windows
Hello,
I have a text string "fn_name" which reads:
fn_name = "C:\Folder1\Folder2\testfile.xlsx"
The file extension of this string could also be .xls , .xlsm, .xlsb etc...
I need VBA code to detect If the file extension is ".xlsx" :
- Save As the file as testfile.xlsm in the same directory path
- Change the file string to "C:\Folder1\Folder2\testfile.xlsm"
many thanks
Andy
I have a text string "fn_name" which reads:
fn_name = "C:\Folder1\Folder2\testfile.xlsx"
The file extension of this string could also be .xls , .xlsm, .xlsb etc...
I need VBA code to detect If the file extension is ".xlsx" :
- Save As the file as testfile.xlsm in the same directory path
- Change the file string to "C:\Folder1\Folder2\testfile.xlsm"
many thanks
Andy