Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm tring to open a window, select a file with CSV extension, the file is coded to SelectedFile and then remove I want to remove the .CSV before renaming the file with the same name albeit with a .TXT extension. I've tried the code below for the inital test but it fails on the WorksheetFunction code. Am I on the right track? Thanks, Rob Sub macro1() Dim Filter, Caption, SelectedFile, DestinationFile As String Filter = "Text files (*.csv),*.csv" Caption = "Please Select a File " & TheUser SelectedFile = Application.GetOpenFilename(Filter, , Caption) SelectedFile = Application.WorksheetFunction _ .Left(SelectedFile, Find(".CSV", (.Upper(SelectedFile)), 1) - 1) Debug.Print SelectedFile End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Retrieving Excel File extension based on XL File Format Enumeratio | Excel Programming | |||
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) | |||
Remove extension | Excel Programming | |||
I need to download an exel spreadsheet file. (file extension :xls) | Excel Discussion (Misc queries) |