RE: Combo Box
- From: teresa <teresa@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 5 Apr 2005 08:01:20 -0700
Thanks All- this is great
"Patrick Molloy" wrote:
> you're correct
> use
>
> dim colClient as long
> colClient = 7 ' 7=G
>
> Key1:=Cells(9,colClient)
>
> you could easily use say the MATCH() function to determine what column to use
> eg
> colClient = work***.functions.Match(what,Range("A9:L9"),False)
>
> HTH
> Patrick
>
> "teresa" wrote:
>
> > Sub SOR()
> > I have a combobox - when I choose an option it arranges data according to
> > Client which is currently in column G, however I need to sort data according
> > to "Client" irrespective of the Column, how do I tinker with the code below
> > to do this - Thanks
> >
> > The bit I think I need changing is Key1:=Range("G9")
> > to
> > Range("col("Client")9) or something like this
> >
> >
> > Range("C9:AS69").Select
> > Selection.Sort Key1:=Range("G9"), Order1:=xlAscending, Header:=xlGuess, _
> > OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
> > End Sub
> >
> >
> >
> >
.
- References:
- Combo Box
- From: teresa
- RE: Combo Box
- From: Patrick Molloy
- Combo Box
- Prev by Date: Re: Excel vba code disappears when saved workbook is re opened
- Next by Date: Re: Copy data
- Previous by thread: RE: Combo Box
- Next by thread: Combo Box
- Index(es):