Taking data from other workbook ina macro

P

Pawan

Hello...

I have a worbook with huge data.
I have to update data in this workbook using other workbook. I have created
one useform which performs lot of activities.

For one specific requirement, I want one field on userform where user will
enter name of the workbook (with its path) from where I have to pick data.
Then after getting that information, I will use that workbook and its data in
my macro.

Is it possible to add this feature on userform?

Thank You

PRML
 
G

Gary''s Student

Put a button on the form to call:

Dim s As String
Sub dural()
s = Application.GetOpenFilename
End Sub

s will have the full path/filename
 
J

Joel

You need to add a Textbox to the userform. then like gary said have the
click macro for the text box call GetOpenFilename and put the filename into
the textbox. GetOpenFilename will only return a filename that exists. If
you want an option to either get an existing filename or create a new
filename then use GetSaveAsFilename instead of GetOpenFileName.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top