Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Input Boxes IN VBA to open files.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi
I was hoping somebody could help me with this. I am trying to create a form or someother way of making the user input a file name and then use it to open that file using VBA. Also if i want to take some specific information from one excel sheet and use it in another ....how can i do that.
Thanks
HS
 
To use the Open File Dialog box...

Filename = Application.GetOpenFilename
If Filename <> False Then
Workbooks.Open Filename:=Filename
End If


To use a simple input box...

Filename = InputBox(&quot;Enter the file name:&quot;, &quot;Open File&quot;)
On Error Resume Next
Workbooks.Open Filename:=Filename
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top