LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help with Macro in Excel 2003

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel 2003 + macro help Neil Holden Excel Discussion (Misc queries) 2 March 17th 10 05:56 PM
Excel 2003 + macro Neil Holden Excel Discussion (Misc queries) 4 March 15th 10 12:35 PM
Excel 2003 Macro vitamin.c Excel Discussion (Misc queries) 2 December 2nd 09 09:06 PM
Macro in Excel 2003 Vicki Excel Programming 1 November 25th 05 10:35 PM
Excel 2003 macro Betina Andersen Excel Programming 0 December 2nd 04 07:28 AM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"