Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All,
In trying to finish off this macro and I am trying to find a way to do a sort on a range. The column that I am sorting by is always teh same, but the range will vary. Is there a way in VBA to pass along that range variable to sort? I would ideally like the input box to be where you can click the box on the right to select your own range from within excel and it will populate that range automatically. Then that range would be passed along to the sort macro. Any help would be greatly appreciated. Nathan Bell |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All I really want to do is make the following Range("A6:G84").Select user
definable with teh input box that allows you to select the range from within excel. "Nathan Bell" wrote in message ... All, In trying to finish off this macro and I am trying to find a way to do a sort on a range. The column that I am sorting by is always teh same, but the range will vary. Is there a way in VBA to pass along that range variable to sort? I would ideally like the input box to be where you can click the box on the right to select your own range from within excel and it will populate that range automatically. Then that range would be passed along to the sort macro. Any help would be greatly appreciated. Nathan Bell |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use Application.Inputbox, with Type:=8
On Error Resume Next Set rng = Application.Inputbox("Select range",Type:=8) If Not rng Is Nothing Then rng.Sort 'etc. The user would then use the mouse to select the range, or type it in the editbox, and this is returned as a range object. -- HTH RP (remove nothere from the email address if mailing direct) "Nathan Bell" wrote in message ... All I really want to do is make the following Range("A6:G84").Select user definable with teh input box that allows you to select the range from within excel. "Nathan Bell" wrote in message ... All, In trying to finish off this macro and I am trying to find a way to do a sort on a range. The column that I am sorting by is always teh same, but the range will vary. Is there a way in VBA to pass along that range variable to sort? I would ideally like the input box to be where you can click the box on the right to select your own range from within excel and it will populate that range automatically. Then that range would be passed along to the sort macro. Any help would be greatly appreciated. Nathan Bell |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to input pictures automatically based on cell input? | Excel Worksheet Functions | |||
run macro with input msg based on cell input | Excel Discussion (Misc queries) | |||
I would like to sort a work sheet based upon user input value,(dat | Excel Worksheet Functions | |||
I would like to sort a work sheet based upon user input value,(dat | Excel Worksheet Functions | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |