Taking data from other workbook ina macro

  • Thread starter Thread starter Pawan
  • Start date Start date
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
 
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
 
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.
 
Back
Top