I’m currently using the below code to open a predefined location so the user can select a file to open.
However, I now have to give the user the option of opening a text file only, which in the above code is easy enough to do. The issue is that I also have to use the Comma Delimiter and format column D “AccountCardNumber” as a text so that it retains the full length, which can be up to 16 digits long.
Any help would be much appreciated as I’m new to VBA.
Code:
SetCurrentDirectory "c:\"
Ret1 = Application.GetOpenFilename("Text Files (*.txt;),*.txt;", _
, "Please select a file")
If Ret1 = False Then Exit Sub
However, I now have to give the user the option of opening a text file only, which in the above code is easy enough to do. The issue is that I also have to use the Comma Delimiter and format column D “AccountCardNumber” as a text so that it retains the full length, which can be up to 16 digits long.
Any help would be much appreciated as I’m new to VBA.