Any VBA Experts? Need some help.?

I am trying to make a macro to open up the directory so i can access and choose any file by just a click of a button. So i click the button, and i need it to open up the directory, and i need to be able to choose the file from there (this is not a specific file...just any file).

Thanks!

Update:

Ok, so i made it a dialog box. Here is the code that i have.

Private Sub CommandButton1_Click()

Application.Dialogs.Item(xlDialogOpen).Show Arg3:=True

End Sub

The problem is that it opens as a read only. Also, i need to get the path of the file on a textbox. So i have to click this button, choose a file (and it can't be read only), and when i say open, its path should show up in the textbox. Then i need to click ANOTHER button, where it takes all the information from the file i just 'opened' and do stuff to it (that issue i know how to deal with).

Thank you for your help! I am a new user to VBA and so this is rather tough for me. Thank you!

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 EBIN.TIPS - All rights reserved.