LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default VBA - Disable up down movement inside ListBox

Hi,

I'm using office XP.
I create a list box , inside ListBox I have some items, when I press
up arrow and down arrow key, upper or bottom item is selected and this is done
without any key-press event subroutine, it is working automatically.

Is it possible somehow to disable this behavior ?
I want to make my own key press event for up and down arrow keys which will
select item, but only in case when some other condition meet .


For example I have in ListBox 10 items, selected item is on 4th place.
When I press up arrow key , event subroutine will start.
This event subroutine will check one condition (from some other subroutine) ,
if this condition is TRUE than selection in listbox will move on 3rd place.
If condition is FALSE than nothing happens, selection stays on 4th place.

Zok


 
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
How do I disable the cursor movement after hitting enter in a cell Randy R Excel Discussion (Misc queries) 1 September 16th 09 02:30 AM
Listbox header inside VBA (Array("Head1", "Head2", ...) Alex St-Pierre Excel Programming 2 October 25th 06 09:28 PM
disable form movement Liedson31 Excel Programming 2 May 9th 05 11:40 AM
how to disable listbox change event Tom Ogilvy Excel Programming 0 July 27th 04 05:55 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


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