View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] imageswords.br@gmail.com is offline
external usenet poster
 
Posts: 14
Default Help with "floating pop up menus" (if that is correct)

Hi there,
this might give you something to go on...

Put this bit in the sheet code module.
-------------------------------------------

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rRangeIfSelectedLaunchPU As Range
Set rRangeIfSelectedLaunchPU = Sheet1.Range("C2:F2") 'If you select
one of these cells you will lanuch your combo etc.
If Not Intersect(Target, rRangeIfSelectedLaunchPU) Is Nothing Then
PopupDropDownLanuch ActiveCell
End If
End Sub

Sub PopupDropDownLanuch(SelectedCell As Range)
Dim rListOfItems As Range
Set rListOfItems = Sheet1.Range("A1:A10") 'This range will hold the
items you want to populate the combo with. U could also use an
array...
UserForm1.Show
UserForm1.ComboBox1.RowSource = rListOfItems.Address 'putting this
line in here is not very good practice but I did it anyway :)
End Sub
--------------------------------------------------------------------------------------


Make a userform and put a combobox on it. Make it a little user form
just big enough to hold your combobox
Put this in the userform code module
--------------------------------------------------------------------------------------

Private Sub ComboBox1_Change()
SelectRange ComboBox1.Value
End Sub

--------------------------------------------------------------------------------------
Put this anywhere.....

Sub SelectRange(ComboSelectedItem As String)
Select Case ComboSelectedItem
Case Is = XYZ
Sheet(Xy).Range(Z).Select
Case Is = ABX
etc
End Select
End Sub

--------------------------------------------------------------------------------------

Hope that helps! :)

Kind regards,
Bernie Russell