Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a list with a fixed no. of columns and a variable no. of rows. I need
to sort this list using a button on another sheet. I am not sure if the error is in selecting the range or in my sort code. The code I have so far is: Private Sub CommandButton2_Click() Do Until [b11] = 0 With Sheets("Existing") Set rgLastEx = Range("A1").SpecialCells_(xlCellTypeLastCell) MsgBox rgLastEx End With With Sheets("Options") Set rgLastOp = Range("A1").SpecialCells_(xlCellTypeLastCell) End With If [b11] < 0 Then MsgBox prompt:="Error detected, click ok to attempt a sort fix", Buttons:=vbExclamation rgLastEx.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess MsgBox prompt:="Existing Sorted" Else: MsgBox prompt:="No errors have been detected, please continue", Buttons:=vbInformation End If Loop End Sub Many thanks for any help Ian |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select a list in 1 cell by selecting an item from another list in | Excel Discussion (Misc queries) | |||
I want sort a list but the sort is unlit on the home tab how do I | Excel Worksheet Functions | |||
DATA VALIDATION LIST- CAN I SELECT FROM LIST WITHOUT SCROLLING | Excel Worksheet Functions | |||
how to randomly select a name in a list and then the select the ne | Excel Worksheet Functions | |||
Excel sort by Fill Color by custom list sort | Excel Discussion (Misc queries) |