Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi There,
Ive got VB that opens a workbook, runs a macro on it and closes the workbook. Currently the VB refers to a specific location. I would like for the user to select from a drop down within the current book the locaton onto which the VB should run, ie take data entered into a sheet and transfer it into VB. An extract of the current VB is sName = Dir("\\server1\Area1\*.xls") Do While sName < "" Set bk = Workbooks.Open("\\server1\Area1\" & sName) Call Macro 1 So basically I want the user to be able to change Area1 to Area2 etc.. Is this possible..?? Regards D *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set bk = Workbooks.Open("\\server1\" & Range("D2").Value & "\" & sName)
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Darin Kramer" wrote in message ... Hi There, Ive got VB that opens a workbook, runs a macro on it and closes the workbook. Currently the VB refers to a specific location. I would like for the user to select from a drop down within the current book the locaton onto which the VB should run, ie take data entered into a sheet and transfer it into VB. An extract of the current VB is sName = Dir("\\server1\Area1\*.xls") Do While sName < "" Set bk = Workbooks.Open("\\server1\Area1\" & sName) Call Macro 1 So basically I want the user to be able to change Area1 to Area2 etc.. Is this possible..?? Regards D *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks bob - and how do I define the range to always point to say sheet
master and then d2 ? as several sheets have changed since the first loop.. Regards D *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set bk = Workbooks.Open("\\server1\" &
Worksheets("Master").Range("D2").Value & "\" & sName) -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Darin Kramer" wrote in message ... Thanks bob - and how do I define the range to always point to say sheet master and then d2 ? as several sheets have changed since the first loop.. Regards D *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Prevent previous entered data from updating | Excel Discussion (Misc queries) | |||
Cannot find info entered when I use filter. HELP! | Excel Discussion (Misc queries) | |||
Updating a SQL table with information entered in an Excel Database | Excel Programming | |||
excel, automatic date and time when info gets entered | Excel Worksheet Functions | |||
Copying info entered on one worksheet automatically to another | Excel Discussion (Misc queries) |