Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default running a macro by a click

I have a macro that I want to run everytime a user select
an option from a drop down list. What the macro does is,
it takes the user to a specific cell depending upon their
selection.
Currently, the macro can only be run either manually or by
clicking on a toolbar button. But I want the macro to
automatically run as soon as the user makes a selection.

Any ideas?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default running a macro by a click

If you are using a combobox from the control toolbox toolbar, then use the
click event.

--
Regards,
Tom Ogilvy

"Nazeer" wrote in message
...
I have a macro that I want to run everytime a user select
an option from a drop down list. What the macro does is,
it takes the user to a specific cell depending upon their
selection.
Currently, the macro can only be run either manually or by
clicking on a toolbar button. But I want the macro to
automatically run as soon as the user makes a selection.

Any ideas?

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default running a macro by a click

Thanks, Tom. How do I use the click event. Can you provide
specific details. I am not familiar with events.

thanks.


-----Original Message-----
If you are using a combobox from the control toolbox

toolbar, then use the
click event.

--
Regards,
Tom Ogilvy

"Nazeer" wrote in message
...
I have a macro that I want to run everytime a user

select
an option from a drop down list. What the macro does is,
it takes the user to a specific cell depending upon

their
selection.
Currently, the macro can only be run either manually or

by
clicking on a toolbar button. But I want the macro to
automatically run as soon as the user makes a selection.

Any ideas?

Thanks.



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default running a macro by a click

after you place the combobox on the worksheet, right click on it and select
view code.

You should be in the click event.

Put the code you want to run there.
--
Regards,
Tom Ogilvy

Nazeer wrote in message
...
Thanks, Tom. How do I use the click event. Can you provide
specific details. I am not familiar with events.

thanks.


-----Original Message-----
If you are using a combobox from the control toolbox

toolbar, then use the
click event.

--
Regards,
Tom Ogilvy

"Nazeer" wrote in message
...
I have a macro that I want to run everytime a user

select
an option from a drop down list. What the macro does is,
it takes the user to a specific cell depending upon

their
selection.
Currently, the macro can only be run either manually or

by
clicking on a toolbar button. But I want the macro to
automatically run as soon as the user makes a selection.

Any ideas?

Thanks.



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default running a macro by a click

How do I use the click event. Can you provide more details
as I am not very familiar with events?

Thanks.

-----Original Message-----
If you are using a combobox from the control toolbox

toolbar, then use the
click event.

--
Regards,
Tom Ogilvy

"Nazeer" wrote in message
...
I have a macro that I want to run everytime a user

select
an option from a drop down list. What the macro does is,
it takes the user to a specific cell depending upon

their
selection.
Currently, the macro can only be run either manually or

by
clicking on a toolbar button. But I want the macro to
automatically run as soon as the user makes a selection.

Any ideas?

Thanks.



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default running a macro by a click

"Nazeer" wrote in message ...
How do I use the click event. Can you provide more details
as I am not very familiar with events?

Thanks.

-----Original Message-----
If you are using a combobox from the control toolbox

toolbar, then use the
click event.

--
Regards,
Tom Ogilvy

"Nazeer" <nbutt@newsameric

If you don't understand Tom's answer, you are a beginner. You haven't
read the visual basic help yet either, I would say. Events are certain
things that can happen in Excel. They are defined in advance, one
event is "right click" on a control, like your pop-down menu. When an
event happens, Excel will look for a special subroutine named after
the event, and if it finds code, it will be run. This is how you do
what you want. It is well documented in help. The Visual Basic editor
will show you all the events associated with an object when you are
editing a code module belonging to the object (above the text editing
screen in VB there are two pop-up lists. Change the left one to be the
object you are editing, and the right one will show you the available
event subroutines, at least in my version of Excel.
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
Disable running of SelectionChange macro when in another macro? Tonso Excel Discussion (Misc queries) 6 March 21st 10 06:50 PM
Pop-up when running a macro tom Excel Discussion (Misc queries) 5 April 2nd 07 08:55 AM
Event Macro running another macro inside K1KKKA Excel Discussion (Misc queries) 1 December 20th 06 08:21 PM
disable user running macro from Tools Macro Steve Simons Excel Discussion (Misc queries) 4 September 28th 06 06:28 AM
Launch Macro in Access via Macro running in Excel??? dgrant Excel Programming 1 September 24th 03 01:38 PM


All times are GMT +1. The time now is 11:42 PM.

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"