CLINT WILLIAMS
Board Regular
- Joined
- Nov 8, 2011
- Messages
- 69
- Office Version
- 365
Good afternoon All
I am hoping that someone can help me please, I am using the split function as below to split the file name with "." which works fine but filename has now changed to : Filename = "Bulk(011)_1021.xlsx" that includes an underscore. How would I alter the MySplit part of the code to include the "_". Any help would be appreciated.
Filename = "Bulk(011).1021.xlsx"
MySplit = Split(Filename, ".", -1)
Mynewfilename = MySplit(0) & "." & SF_YYYY & "." & MySplit(2)
Workbooks.Open Filename:=Path & Mynewfilename, UpdateLinks:=False
MyBook2 = ActiveWorkbook.Name
Thanks
Clint
I am hoping that someone can help me please, I am using the split function as below to split the file name with "." which works fine but filename has now changed to : Filename = "Bulk(011)_1021.xlsx" that includes an underscore. How would I alter the MySplit part of the code to include the "_". Any help would be appreciated.
Filename = "Bulk(011).1021.xlsx"
MySplit = Split(Filename, ".", -1)
Mynewfilename = MySplit(0) & "." & SF_YYYY & "." & MySplit(2)
Workbooks.Open Filename:=Path & Mynewfilename, UpdateLinks:=False
MyBook2 = ActiveWorkbook.Name
Thanks
Clint