Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default listbox macro scrolling problem

I have a listbox with a macro assigned. Macro activates when I click
on a different row in the listbox.
It also activates the macro when i scroll up and down. This is
undesirable. Can i turn this off while scrolling.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default listbox macro scrolling problem

On Jan 7, 3:47*pm, Fan924 wrote:
I have a listbox with a macro assigned. Macro activates when I click
on a different row in the listbox.
It also activates the macro when i scroll up and down. This is
undesirable. Can i turn this off while scrolling.


Not sure which event your using, but try the _Itemclick event for
the control.

rgds,
David
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default listbox macro scrolling problem

There is an ItemClick Event? I don't see that.

Try the MouseUp or MouseDown Event. This event will fire when you mouse
button is clicked down or release.

Hope this helps! If so, let me know, click "YES" below.
--
Cheers,
Ryan


"Fan924" wrote:

I have a listbox with a macro assigned. Macro activates when I click
on a different row in the listbox.
It also activates the macro when i scroll up and down. This is
undesirable. Can i turn this off while scrolling.
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default listbox macro scrolling problem

I tried to duplicate the problem by using different events to trigger the
macro and could not get the same result. I could scroll without triggering
the macro when I used the click, change, key press, key down, mouse down
events. are you sure you are not clicking inside the display window?



"Fan924" wrote in message
...
I have a listbox with a macro assigned. Macro activates when I click
on a different row in the listbox.
It also activates the macro when i scroll up and down. This is
undesirable. Can i turn this off while scrolling.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default listbox macro scrolling problem

Im using the listbox off of the Forms toolbal.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default listbox macro scrolling problem

Im using the listbox off of the Forms toolbar.
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default listbox macro scrolling problem

If you're going to use a listbox from the Forms toolbar, I wouldn't assign a
macro to it.

Instead, I'd add a button from the Forms toolbar right near that listbox. Then
let the user do what they want with the listbox and when they're ready, they can
click on the button (that has the macro assigned to it).



Fan924 wrote:

I have a listbox with a macro assigned. Macro activates when I click
on a different row in the listbox.
It also activates the macro when i scroll up and down. This is
undesirable. Can i turn this off while scrolling.


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default listbox macro scrolling problem

Nice dave as always. Thanks all.
I end up adding a filter to the front end of the macro. The macro only
runs now when the list index number is changed. This filters out the
triggering of the macro by the scrollbar.

If Range("AH10").Value = .ListIndex Then ' old value at Range
("AH10").Value
Exit Sub
End If

On Jan 7, 1:32*pm, Dave Peterson wrote:
If you're going to use a listbox from the Forms toolbar, I wouldn't assign a
macro to it.

Instead, I'd add a button from the Forms toolbar right near that listbox. *Then
let the user do what they want with the listbox and when they're ready, they can
click on the button (that has the macro assigned to it).

Fan924 wrote:

I have a listbox with a macro assigned. Macro activates when I click
on a different row in the listbox.
It also activates the macro when i scroll up and down. This is
undesirable. Can i turn this off while scrolling.


--

Dave Peterson


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
Listbox Scrolling StumpedAgain Excel Programming 1 July 29th 08 11:24 PM
Scrolling in a form's listbox cht13er Excel Programming 1 April 18th 08 02:38 AM
Want listbox to move when scrolling down spreadsheet kdunnSBLI Excel Discussion (Misc queries) 3 June 23rd 05 11:11 PM
ListBox Scrolling in VBA Kevin Excel Programming 4 July 7th 04 10:27 PM
listbox scrolling with mouse Graham[_4_] Excel Programming 4 December 11th 03 05:58 PM


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