Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
In VBA Excel 2002 I need a way to determine over which row of a ListBox mouse pointer is. I know mouse Y position from BeforeDropOrPaste and need to translate it to actual target row - for the purpose of drop-inserting. Knowledge Base has an example that doesn't work for me - http://msdn.microsoft.com/library/de...l/dragdrop.asp Any known updates to the method? TIA Paul |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul,
Surely the Y position cannot relate to a row, as in one instance the mouse could be over a row that is 3rd in the visible list, in another it could be over the same row, but that row is 4th in the visible list. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "count" wrote in message ... Hi, In VBA Excel 2002 I need a way to determine over which row of a ListBox mouse pointer is. I know mouse Y position from BeforeDropOrPaste and need to translate it to actual target row - for the purpose of drop-inserting. Knowledge Base has an example that doesn't work for me - http://msdn.microsoft.com/library/de...l/dragdrop.asp Any known updates to the method? TIA Paul |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Bob,
Yes, this is a problem and ListBox has TopIndex to address it - I think. Still, I need method or "user32" function to answer me how high each of ListBox lines is. It used to be available in olden 16-bit days. The issue is that the code may be used on a pc, where font < Tahoma 8 pt and then this calculation: TargetRow = ListBox1.TopIndex + Int((Y + 4.5) / 10) will not do anymore. Thanks again Paul Użytkownik "Bob Phillips" napisał w wiadomo¶ci ... Paul, Surely the Y position cannot relate to a row, as in one instance the mouse could be over a row that is 3rd in the visible list, in another it could be over the same row, but that row is 4th in the visible list. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "count" wrote in message ... Hi, In VBA Excel 2002 I need a way to determine over which row of a ListBox mouse pointer is. I know mouse Y position from BeforeDropOrPaste and need to translate it to actual target row - for the purpose of drop-inserting. Knowledge Base has an example that doesn't work for me - http://msdn.microsoft.com/library/de...l/dragdrop.asp Any known updates to the method? TIA Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how can i determine the area under a graph ( distance vrs height) | Charts and Charting in Excel | |||
Determine size of listbox | Excel Discussion (Misc queries) | |||
Drag/drop - calc of ListBox row wanted | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Is refreshing listbox rowsource in listbox click event possible? | Excel Programming |