Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm hoping someone could help with this
'Sub sort() '' '' sort Macro '' Macro recorded 6/11/2007 by Ibartlett 'Const csPWORD As String = "CRU" 'ActiveWorkbook.Worksheets("Sorted_BedBoard_List") .Unprotect Password:=csPWORD ' ' ' Sheets("Sorted_BedBoard_List").Select ' Columns("A:G").Select ' Selection.sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlYes, _ ' OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ ' DataOption1:=xlSortNormal ' ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True ' Sheets("Sheet1").Select ' Range("D5").Select ' ActiveWorkbook.Worksheets("Sorted_BedBoard_List"). Protect Password:=csPWORD ' 'End Sub this doesn't work this works but doesn't incorporate the sheet protection of course Sub Macro2() ' ' Macro2 Macro ' Macro recorded 6/12/2007 by Ibartlett ' Application.ScreenUpdating = False Sheets("Sorted_BedBoard_List").Select Columns("A:G").Select Selection.sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlYes, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Sheets("Sheet1").Select Range("D5").Select Application.ScreenUpdating = True End Sub Thanks for any help Bart |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unprotect and Protect sheet within macro | Excel Programming | |||
Unprotect and protect sheet in a macro | Excel Programming | |||
Excel VBA-Protect and unprotect sheet with BVA | Excel Programming | |||
Protect/unprotect sheet with password with VBA? | Excel Programming | |||
VBA code - protect and unprotect a sheet | Excel Programming |