Combobox
Ive tried the below - howver doesnt seem to call CL, always calls "Value"
Thanks
Private Sub ComboBox1_Change()
If Worksheets("Sheet1").Range("AA3").Value = "C" Then
Call CL
Else
Call Value
End If
End Sub
"Bob Phillips" wrote:
In two cells, say AA1 and AA2, put the values SORT-CLIENT and SORT-LIST,
select a combobox form the Forms toolbar, and right-click the combox to
select Format Control from the menu, and on the Control tab set the Input
Range texbox to AA1:AA2, and the Cell link textbox to AA3. OK out.
Add this macro to a general code module
Sub SortData()
If Worksheets("Sheet1").Range("AA3").Value ="SORT-CLIENT" Then
SortbyClientMacro
Else
SortByValueMacro
End If
End Sub
Now go back to the worksheet, right-click the combobox again, select Assign
Macro, and assign the above macro to the combobox.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"teresa" wrote in message
...
Hi,
I have a couple of macros which:
a) sort a list by client
b) sort a list by value
I need two options within the combo box
and when I choose option "SORT-CLIENT" the first macro is run
Thks
|