Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Handling Worksheet Events of a Worksheet Created During Runtime.

Hi Everyone.

I have a small program which creates a worksheet at runtime to display
the results of its analysis in the active workbook. I wish to use
either the worksheet SelectionChange or BeforeRightClick event to
respond to the user interacting with a specific section of the results
worksheet.

If the results worksheet is created at runtime, can anyone tell me how
I should code the user interaction worksheet event ?

If I must create some kind of dynamic worksheet event handler class,
are there examples out there ? Or is the proper solution more obvious
than that ?

Thanks in advance

Chatterbox

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Handling Worksheet Events of a Worksheet Created During Runtime.

Why not use the Workbook level version of these events. This will pass in
the sheet where the event occured. Then you can decide, based on the name of
the sheet, whether to perform you action or not.

The alternative is to write the event code to the sheet event after you
create the sheet. I haven't done much serious work in this area, but it
always appeared "fragile" to me (error prone).
http://www.cpearson.com/excel/vbe.htm
for some sample code.

--
Regards,
Tom Ogilvy


"chatterbox" wrote:

Hi Everyone.

I have a small program which creates a worksheet at runtime to display
the results of its analysis in the active workbook. I wish to use
either the worksheet SelectionChange or BeforeRightClick event to
respond to the user interacting with a specific section of the results
worksheet.

If the results worksheet is created at runtime, can anyone tell me how
I should code the user interaction worksheet event ?

If I must create some kind of dynamic worksheet event handler class,
are there examples out there ? Or is the proper solution more obvious
than that ?

Thanks in advance

Chatterbox


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
Assigning events to runtime-created controls - is it possible? BizMark Excel Discussion (Misc queries) 1 November 20th 06 09:36 AM
Error Handling for Duplicate Worksheet Names MWS Excel Programming 3 March 7th 06 06:19 PM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie[_2_] Excel Programming 2 September 22nd 04 03:30 PM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie[_3_] Excel Programming 0 September 22nd 04 03:26 PM
Handling Errors from Worksheet Functions Nigel[_4_] Excel Programming 1 October 7th 03 07:46 PM


All times are GMT +1. The time now is 03:57 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"