Macros

M

MSHO

Trying to prompt using a InputBox() for different files. Problem is, the
files are named the same but under different folders. (The folders are each a
different year, and the files are of the same idea with different data) I
want to be able to ask for two samely named files under two different
folders.

Any ideas?

Thanks!
 
U

uf_gator

There is a specific method for getting filenames (and their paths):

fileToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls")
If fileToOpen <> False Then
Workbooks.Open fileToOpen
End If

Be sure to keep the If statement as it checks to see if the user
cancelled the box.
 
U

uf_gator

There is a specific method for getting filenames (and their paths):

fileToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls")
If fileToOpen <> False Then
Workbooks.Open fileToOpen
End If

Be sure to keep the If statement as it checks to see if the user
cancelled the box.
 
D

Dave Peterson

You can ask by using two application.getopenfilename() commands. But remember,
only one workbook with that name can be open at any given time.
 
Top