M
mike
I prompt a user to select the file they want. They do
this for three different files. I would like to create a
variable with the file name only. That way, later in the
program, I would like to refer to the appropriate workbook
based on the file name they selected.
For instance, I would like to do something like this:
Workbooks (vFileName1).Activate or
Workbooks (vFileName2).Close
The variables I have created so far also contain the
path. My variable looks like this:
Workbooks (C:\MyDocs\File1.xls)
Is it possible to create a variable with only the file
name and not the entire path? Thanks for the help.
this for three different files. I would like to create a
variable with the file name only. That way, later in the
program, I would like to refer to the appropriate workbook
based on the file name they selected.
For instance, I would like to do something like this:
Workbooks (vFileName1).Activate or
Workbooks (vFileName2).Close
The variables I have created so far also contain the
path. My variable looks like this:
Workbooks (C:\MyDocs\File1.xls)
Is it possible to create a variable with only the file
name and not the entire path? Thanks for the help.