Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have been using the following code in Excel 2007 and it has been working
fine. I need for the code to work just as well in Excel 2003 but it runs slower and I get a Runtime Error 438: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim wCtr As Long Dim w As Worksheet Dim myNames As Variant Sheets(Array("Carrier Rates", "Template")).Select Sheets("Carrier Rates").Activate Rows("2:2").Select Selection.AutoFill Destination:=Rows("2:3000"), Type:=xlFillDefault Rows("2:3000").Select Sheets("TEMPLATE").Activate Rows("2:2").Select Selection.AutoFill Destination:=Rows("2:3000"), Type:=xlFillDefault Rows("2:3000").Select Sheets("Template").Select ActiveSheet.Range("$A$1:$AC$3000").RemoveDuplicate s Columns:=Array(1, 2, 3, 4, 5 _ , 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29), Header _ :=xlYes Sheets("Carrier Rates").Select ActiveSheet.Range("$A$2:$Y$3000").RemoveDuplicates Columns:=Array(1, 2, 3, 4, 5, 6 _ , 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25), Header:=xlYes End Sub I am getting a Runtime error on "RemoveDuplicates" because it is not recognized in Excel 2003. Any suggestions to increase speed and eliminate the Runtime Error? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel 2003 + macro help | Excel Discussion (Misc queries) | |||
Excel 2003 + macro | Excel Discussion (Misc queries) | |||
Excel 2003 Macro | Excel Discussion (Misc queries) | |||
Macro in Excel 2003 | Excel Programming | |||
Excel 2003 macro | Excel Programming |