ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Taking data from other workbook ina macro (https://www.excelbanter.com/excel-programming/416645-taking-data-other-workbook-ina-macro.html)

Pawan

Taking data from other workbook ina macro
 
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

Gary''s Student

Taking data from other workbook ina macro
 
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
--
Gary''s Student - gsnu200802


"Pawan" wrote:

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


joel

Taking data from other workbook ina macro
 
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.


"Pawan" wrote:

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



All times are GMT +1. The time now is 09:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com