ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Constant execution of ListBox.Click (https://www.excelbanter.com/excel-programming/420207-constant-execution-listbox-click.html)

Curious George[_2_]

Constant execution of ListBox.Click
 
How do I constantly make events fire, like ListBox.Click subroutine.
Currently I can run the result only by executing the macro run button
thingie. Cant I make the VBA work all the time without pressing any
buttons to run the code?

Susan

Constant execution of ListBox.Click
 
under what conditions do you want it to fire? what event would
trigger the code?
is the listbox in the worksheet, or is it in a userform?
yes, you can probably do what you want, but you have to give it some
parameters. i don't know if you'd need worksheet_change or
worksheet_selectionchange. answer the questions and maybe me (or
somebody else) can figure it out for you.
:)
susan


On Nov 18, 3:03*pm, Curious George wrote:
How do I constantly make events fire, like ListBox.Click subroutine.
Currently I can run the result only by executing the macro run button
thingie. Cant I make the VBA work all the time without pressing any
buttons to run the code?



Harald Staff[_2_]

Constant execution of ListBox.Click
 
Don't multipost.

"Curious George" wrote in message
.fi...
How do I constantly make events fire, like ListBox.Click subroutine.
Currently I can run the result only by executing the macro run button
thingie. Cant I make the VBA work all the time without pressing any
buttons to run the code?



Curious George[_2_]

Constant execution of ListBox.Click
 
Susan wrote:
under what conditions do you want it to fire? what event would
trigger the code?
is the listbox in the worksheet, or is it in a userform?
yes, you can probably do what you want, but you have to give it some
parameters. i don't know if you'd need worksheet_change or
worksheet_selectionchange. answer the questions and maybe me (or
somebody else) can figure it out for you.
:)
susan


On Nov 18, 3:03 pm, Curious George wrote:
How do I constantly make events fire, like ListBox.Click subroutine.
Currently I can run the result only by executing the macro run button
thingie. Cant I make the VBA work all the time without pressing any
buttons to run the code?



Yes, I am using worksheet since userforms are way too complicated.

Susan

Constant execution of ListBox.Click
 
and the rest of the questions?
i can't help you unless you help me.
susan


On Nov 19, 12:20*am, Curious George wrote:
Susan wrote:
under what conditions do you want it to fire? *what event would
trigger the code?
is the listbox in the worksheet, or is it in a userform?
yes, you can probably do what you want, but you have to give it some
parameters. *i don't know if you'd need worksheet_change or
worksheet_selectionchange. *answer the questions and maybe me (or
somebody else) can figure it out for you.
:)
susan


On Nov 18, 3:03 pm, Curious George wrote:
How do I constantly make events fire, like ListBox.Click subroutine.
Currently I can run the result only by executing the macro run button
thingie. Cant I make the VBA work all the time without pressing any
buttons to run the code?


Yes, I am using worksheet since userforms are way too complicated.- Hide quoted text -

- Show quoted text -



Curious George[_2_]

Constant execution of ListBox.Click
 
Susan wrote:
and the rest of the questions?
i can't help you unless you help me.
susan


On Nov 19, 12:20 am, Curious George wrote:
Susan wrote:
under what conditions do you want it to fire? what event would
trigger the code?
is the listbox in the worksheet, or is it in a userform?
yes, you can probably do what you want, but you have to give it some
parameters. i don't know if you'd need worksheet_change or
worksheet_selectionchange. answer the questions and maybe me (or
somebody else) can figure it out for you.
:)
susan
On Nov 18, 3:03 pm, Curious George wrote:
How do I constantly make events fire, like ListBox.Click subroutine.
Currently I can run the result only by executing the macro run button
thingie. Cant I make the VBA work all the time without pressing any
buttons to run the code?

Yes, I am using worksheet since userforms are way too complicated.- Hide quoted text -

- Show quoted text -



Its been fixed with changing the Click event to Change, since apparently
method that is called when I click on the listbox items isn't click, but
change. Or rather that I assumed that Click works with every click.


All times are GMT +1. The time now is 05:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com