Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Activating a workbook help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Activating a workbook help

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activating Workbooks Sungibungi Excel Discussion (Misc queries) 2 June 5th 09 04:22 AM
Activating a Worksheet? Kenny R Excel Discussion (Misc queries) 3 December 8th 06 05:15 PM
Activating a Macro d_kight New Users to Excel 5 June 30th 06 07:46 PM
List box not activating sue74 Excel Discussion (Misc queries) 0 November 8th 05 01:34 PM
Activating a Hyperlink Jeremy S Excel Discussion (Misc queries) 3 July 3rd 05 02:15 AM


All times are GMT +1. The time now is 12:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"