![]() |
MACRO Run Time Error 1004
Anbody have any ideas why this macro is generating a Run Time Error 1004 on
certain machines? Sub Sort() ' ' Sort Macro ' Macro recorded 30/06/2006 by mintt ' ' Range("A2:B52").Select Selection.Sort Key1:=Range("B3"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Range("A2").Select Sheets("Cash Imprest").Select ActiveWindow.LargeScroll Down:=1 Range("G48:J98").Select Selection.Sort Key1:=Range("I49"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom ActiveWindow.LargeScroll Down:=-1 Range("A1:M2").Select Sheets("New Codes").Select Range("A1").Select End Sub |
MACRO Run Time Error 1004
Is the worksheet protected?
Do you use merged cells in that range? Can you do the same sort manually? The Toasterman wrote: Anbody have any ideas why this macro is generating a Run Time Error 1004 on certain machines? Sub Sort() ' ' Sort Macro ' Macro recorded 30/06/2006 by mintt ' ' Range("A2:B52").Select Selection.Sort Key1:=Range("B3"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Range("A2").Select Sheets("Cash Imprest").Select ActiveWindow.LargeScroll Down:=1 Range("G48:J98").Select Selection.Sort Key1:=Range("I49"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom ActiveWindow.LargeScroll Down:=-1 Range("A1:M2").Select Sheets("New Codes").Select Range("A1").Select End Sub -- Dave Peterson |
All times are GMT +1. The time now is 07:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com