View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Corey Corey is offline
external usenet poster
 
Posts: 363
Default Curly Question with a Combobox

I tried and pasted the below code into the MOUSEMOVE event,
I get the WorkSheet flickering but it does not scroll up or down at all??

Private Sub ComboBox3_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single,
ByVal Y As Single)
On Error Resume Next
With Worksheets("InspectionData").Range("A:A")
Set rngFound = .Find(What:=Me.ComboBox3.Value, After:=.Range("A1"), LookIn:=xlValues,
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, Matchbyte:=False)
rngFound.Offset(25, 0).Activate
End With
With ActiveWindow
..ScrollRow = ActiveCell.Row - Int(.VisibleRange.Rows.Count / 2)
..ScrollColumn = ActiveCell.Column - Int((.VisibleRange.Columns.Count - 1) / 2)
End With
On Error GoTo 0
Application.ScreenUpdating = True
End Sub


Can i replace the 'Me.Combobox3.Value' with a Me.Combobox3.SelectionHighlighted or similar ?


Corey....
"Corey" wrote in message ...
If i set Application.ScreenUpdating = True,
when the user triggers the Combobox1 DropButtonClick_Event ( ),
the userform that displays the Combobox stays in the centre of the screen and the page that contains
the values listed in the Combobox appears in the back ground.
With me so far?

Now, the values of the Combobox.List are in Column A which can be seen in the background worksheet
once the DropButtonClick event is triggered.

Here is the Question :

If I place my MOUSE over a value in the list, Can the WorkSheet in the background scroll Up/Down to
Centre the Value or set the value to the top of the page?


I have values i need to LOOK at that are in Column C 2-22 rows below the value in Column A.

Is this possible?
What does the Mouse Up, Mouse Down, Mouse Move event's do, is this it???


How can i code this if that is the case ??

Corey....