Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am attempting to develop a utility that has several workbooks in it. In an unrelated workbook worksheet I have a command button that launches a userform containing a MultiPage control. The first tab on the control presents the user with several option buttons; each button is associated with a workbook in the utility. The remaining tabs in the MultiPage control perform various operations on the selected workbook. When I select an option button to activate a selected workbook and apply that selection I get a error - runtime error 9: subscript out of range. The code I am using to activate a typical workbook in the group is as follows: Workbooks("<full path nameCash Transactions.xls").Activate My question is how do I programmatically activate a workbook for subsequent data entry from a userform? Is the above code correct? Can you even activate workbooks using the technique I described above? TIA ... Mike |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The argument to the workbooks collection is the workbook name without the
path. Workbooks("Myfile.xls").Activate as an example. -- regards, Tom Ogilvy "bmwmcrider" wrote in message om... Hello, I am attempting to develop a utility that has several workbooks in it. In an unrelated workbook worksheet I have a command button that launches a userform containing a MultiPage control. The first tab on the control presents the user with several option buttons; each button is associated with a workbook in the utility. The remaining tabs in the MultiPage control perform various operations on the selected workbook. When I select an option button to activate a selected workbook and apply that selection I get a error - runtime error 9: subscript out of range. The code I am using to activate a typical workbook in the group is as follows: Workbooks("<full path nameCash Transactions.xls").Activate My question is how do I programmatically activate a workbook for subsequent data entry from a userform? Is the above code correct? Can you even activate workbooks using the technique I described above? TIA ... Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Activating Workbooks | Excel Discussion (Misc queries) | |||
Activating a Worksheet? | Excel Discussion (Misc queries) | |||
Activating a Macro | New Users to Excel | |||
List box not activating | Excel Discussion (Misc queries) | |||
Activating a Hyperlink | Excel Discussion (Misc queries) |