Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Simulate Click Event

Is there any way to simulate a click event of a Msforms.Label.

This is a label embedded into the worksheet as a shape. When the user clicks
the label, it calls a Class Procedure (there are 108 labels all doing the
same thing.) What I want to do is click one or more labels at a time
programmatically (can't just call the procedure because one i'm calling from
a seperate vba project and that causes headaches, and two i need the name of
the label that i'm clicking and the class procedure passes that argument on
the Click Event.


So can I simulate a click even on an Embedded Msforms.Label?
--
When you lose your mind, you free your life.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Simulate Click Event

an MSForms.Label embedded on a worksheet has a click event. It is unclear
to me what your question is or why you would need to simulate a click event.

--
Regards,
Tom Ogilvy


"ben" (remove this if mailing direct) wrote in message
...
Is there any way to simulate a click event of a Msforms.Label.

This is a label embedded into the worksheet as a shape. When the user

clicks
the label, it calls a Class Procedure (there are 108 labels all doing the
same thing.) What I want to do is click one or more labels at a time
programmatically (can't just call the procedure because one i'm calling

from
a seperate vba project and that causes headaches, and two i need the name

of
the label that i'm clicking and the class procedure passes that argument

on
the Click Event.


So can I simulate a click even on an Embedded Msforms.Label?
--
When you lose your mind, you free your life.



  #3   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Simulate Click Event

Tom,


I need to simulate a click event because, when a user actually clicks
this object it runs code. I want that code to run. And I can not just call
the routine, because it is in a Class Module (there are 108 objects in a
collection that run this code.) They are all in one collection, and in order
for the code to work, i need the name of the label that called the code, and
the click event passes that name into the code as it runs.
--
When you lose your mind, you free your life.


"Tom Ogilvy" wrote:

an MSForms.Label embedded on a worksheet has a click event. It is unclear
to me what your question is or why you would need to simulate a click event.

--
Regards,
Tom Ogilvy


"ben" (remove this if mailing direct) wrote in message
...
Is there any way to simulate a click event of a Msforms.Label.

This is a label embedded into the worksheet as a shape. When the user

clicks
the label, it calls a Class Procedure (there are 108 labels all doing the
same thing.) What I want to do is click one or more labels at a time
programmatically (can't just call the procedure because one i'm calling

from
a seperate vba project and that causes headaches, and two i need the name

of
the label that i'm clicking and the class procedure passes that argument

on
the Click Event.


So can I simulate a click even on an Embedded Msforms.Label?
--
When you lose your mind, you free your life.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Simulate Click Event

It is unclear what you have working and what you want to work, but I think
John Walkenbach's sample of how to handle the click event for multiple
commandbuttons is easily adaptable to your situation and using that would
give you a reference to the label that triggered the event.

http://j-walk.com/ss/excel/tips/tip44.htm
Handle Multiple UserForm Buttons With One Subroutine

--
Regards,
Tom Ogilvy



"ben" (remove this if mailing direct) wrote in message
...
Tom,


I need to simulate a click event because, when a user actually clicks
this object it runs code. I want that code to run. And I can not just call
the routine, because it is in a Class Module (there are 108 objects in a
collection that run this code.) They are all in one collection, and in

order
for the code to work, i need the name of the label that called the code,

and
the click event passes that name into the code as it runs.
--
When you lose your mind, you free your life.


"Tom Ogilvy" wrote:

an MSForms.Label embedded on a worksheet has a click event. It is

unclear
to me what your question is or why you would need to simulate a click

event.

--
Regards,
Tom Ogilvy


"ben" (remove this if mailing direct) wrote in

message
...
Is there any way to simulate a click event of a Msforms.Label.

This is a label embedded into the worksheet as a shape. When the user

clicks
the label, it calls a Class Procedure (there are 108 labels all doing

the
same thing.) What I want to do is click one or more labels at a time
programmatically (can't just call the procedure because one i'm

calling
from
a seperate vba project and that causes headaches, and two i need the

name
of
the label that i'm clicking and the class procedure passes that

argument
on
the Click Event.


So can I simulate a click even on an Embedded Msforms.Label?
--
When you lose your mind, you free your life.






  #5   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Simulate Click Event

Tom,

Thank You, However I am familuar with that routine that is what is currently
set up in my system to handle this as a user actually moving the mouse and
pressing the button over the label to call the click event. That is not what
I need. I want to know if there is a way, to Call the Class Collection Click
Event while passing the name of the Label to the sub that handles it. (In a
Class module). Therefore I would like to trick excel into thinking the label
was clicked with the mouse....
Ben
--
When you lose your mind, you free your life.


"Tom Ogilvy" wrote:

It is unclear what you have working and what you want to work, but I think
John Walkenbach's sample of how to handle the click event for multiple
commandbuttons is easily adaptable to your situation and using that would
give you a reference to the label that triggered the event.

http://j-walk.com/ss/excel/tips/tip44.htm
Handle Multiple UserForm Buttons With One Subroutine

--
Regards,
Tom Ogilvy



"ben" (remove this if mailing direct) wrote in message
...
Tom,


I need to simulate a click event because, when a user actually clicks
this object it runs code. I want that code to run. And I can not just call
the routine, because it is in a Class Module (there are 108 objects in a
collection that run this code.) They are all in one collection, and in

order
for the code to work, i need the name of the label that called the code,

and
the click event passes that name into the code as it runs.
--
When you lose your mind, you free your life.


"Tom Ogilvy" wrote:

an MSForms.Label embedded on a worksheet has a click event. It is

unclear
to me what your question is or why you would need to simulate a click

event.

--
Regards,
Tom Ogilvy


"ben" (remove this if mailing direct) wrote in

message
...
Is there any way to simulate a click event of a Msforms.Label.

This is a label embedded into the worksheet as a shape. When the user
clicks
the label, it calls a Class Procedure (there are 108 labels all doing

the
same thing.) What I want to do is click one or more labels at a time
programmatically (can't just call the procedure because one i'm

calling
from
a seperate vba project and that causes headaches, and two i need the

name
of
the label that i'm clicking and the class procedure passes that

argument
on
the Click Event.


So can I simulate a click even on an Embedded Msforms.Label?
--
When you lose your mind, you free your life.








  #6   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Simulate Click Event

Tom,
Perhaps this will make it clearer I want to accomplished what is
accomplished by the following.
If a user clicks a CheckBox, it calls that CheckBox_click code
or
if code says "checkbox.value = True" then IT ALSO calls that checkbox_Click
Code
can the same be done with a LABEL?
--
When you lose your mind, you free your life.


"ben" wrote:

Tom,

Thank You, However I am familuar with that routine that is what is currently
set up in my system to handle this as a user actually moving the mouse and
pressing the button over the label to call the click event. That is not what
I need. I want to know if there is a way, to Call the Class Collection Click
Event while passing the name of the Label to the sub that handles it. (In a
Class module). Therefore I would like to trick excel into thinking the label
was clicked with the mouse....
Ben
--
When you lose your mind, you free your life.


"Tom Ogilvy" wrote:

It is unclear what you have working and what you want to work, but I think
John Walkenbach's sample of how to handle the click event for multiple
commandbuttons is easily adaptable to your situation and using that would
give you a reference to the label that triggered the event.

http://j-walk.com/ss/excel/tips/tip44.htm
Handle Multiple UserForm Buttons With One Subroutine

--
Regards,
Tom Ogilvy



"ben" (remove this if mailing direct) wrote in message
...
Tom,


I need to simulate a click event because, when a user actually clicks
this object it runs code. I want that code to run. And I can not just call
the routine, because it is in a Class Module (there are 108 objects in a
collection that run this code.) They are all in one collection, and in

order
for the code to work, i need the name of the label that called the code,

and
the click event passes that name into the code as it runs.
--
When you lose your mind, you free your life.


"Tom Ogilvy" wrote:

an MSForms.Label embedded on a worksheet has a click event. It is

unclear
to me what your question is or why you would need to simulate a click

event.

--
Regards,
Tom Ogilvy


"ben" (remove this if mailing direct) wrote in

message
...
Is there any way to simulate a click event of a Msforms.Label.

This is a label embedded into the worksheet as a shape. When the user
clicks
the label, it calls a Class Procedure (there are 108 labels all doing

the
same thing.) What I want to do is click one or more labels at a time
programmatically (can't just call the procedure because one i'm

calling
from
a seperate vba project and that causes headaches, and two i need the

name
of
the label that i'm clicking and the class procedure passes that

argument
on
the Click Event.


So can I simulate a click even on an Embedded Msforms.Label?
--
When you lose your mind, you free your life.






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
Click event to run only once gavmer[_88_] Excel Programming 1 October 6th 04 12:52 PM
How to simulate worksheet rename event Nacho Nachev Excel Programming 4 October 5th 04 03:03 PM
EXCEL 2002: How do I user/simulate a Timer event in Excel form JohnF[_2_] Excel Programming 12 September 23rd 04 04:56 PM
Is there a way to simulate a 'Hide Column' Event? Alan Excel Programming 0 August 31st 04 05:59 AM
EXCEL 2002: How do I user/simulate a Timer event in Excel form John Fejsa Excel Programming 2 August 18th 04 03:44 AM


All times are GMT +1. The time now is 10:45 AM.

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

About Us

"It's about Microsoft Excel"