Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have an excel spreadsheet 2003 which I use to sort information. On the
index sheet I have buttons with macros that hide certain columns and then sort information on the remaining column in sheet 2. If a user doesn't unsort when they return to the index sheet this creates a problem the next time someone sorts using a button. I have inserted an unsort code into the buttons so that it will unsort first and unhide the columns then run the sort macro which works really well. Someone suggested I put the unsort code into the index sheet code which I have but it doesn't work. Private Sub Worksheet_Activate() Sheets("Contact Numbers").Select Selection.AutoFilter Field:=3 Columns("D:S").Select Selection.EntireColumn.Hidden = False Sheets("Index").Select Range("A1").Select End Sub The error starts at the Columns("D:S").Select with the message Select method of range class failed Can someone suggest a solution to this please. Thankyou Kerry |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What is the code for the active worksheet? | Excel Discussion (Misc queries) | |||
VBA Code for selecting worksheet | Excel Discussion (Misc queries) | |||
Need Worksheet Code | Excel Worksheet Functions | |||
worksheet code | Excel Discussion (Misc queries) | |||
Code to determine name of Worksheet | Excel Discussion (Misc queries) |