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: 1
Default Excel 2003 Issue with UsedRange.Copy (code works in Excel 2002)

I have been running the below code in an Excel Macro without any issues to
copy selective rows of data to a temp1 worksheet based upon a autofilter
selection. After I went to Office 2003 Professional for Office XP Pro, I
get a run-time error '1004' on the line for the UsedRange.Copy. Does any
one know of a fix or why this is happening?

'Filter and copy code:
If Worksheets(GLBalance).FilterMode = True Then
Worksheets(GLBalance).ShowAllData
End If
Worksheets(GLBalance).Range(ColGLBalCompanyCode & "1").AutoFilter _
field:=1, _
Criteria1:=szCompanyCode
Worksheets(GLBalance).Range(ColGLBalYear & "1").AutoFilter _
field:=3, _
Criteria1:=nYear
Worksheets(GLBalance).Range(ColGLBalPeriod & "1").AutoFilter _
field:=4, _
Criteria1:="<=" & szPeriod
Worksheets(Temp1).Cells.ClearContents
ActiveWorkbook.Worksheets(GLBalance).Activate
ActiveWorkbook.Worksheets(GLBalance).Cells.Special Cells(xlCellTypeVisible).S
elect
ActiveWorkbook.Worksheets(GLBalance).UsedRange.Cop y _
Destination:=ActiveWorkbook.Worksheets(Temp1).Rang e("A1")


 
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
Code works with Excel 2000 but not with Excel 2002 La Durande Excel Programming 0 September 17th 04 09:46 PM
Code works with Excel 2000 but not with Excel 2002 Tom Ogilvy Excel Programming 0 September 17th 04 09:21 PM
Code works with Excel 2000 but not with Excel 2002 La Durande Excel Programming 0 September 17th 04 08:49 PM
code works in excel 2002, but not in excel 2003 pyc Excel Programming 2 September 2nd 04 01:16 PM
Excel 2002/2003 Macro Compatibility issue Steve[_64_] Excel Programming 0 July 23rd 04 03:05 AM


All times are GMT +1. The time now is 01:31 PM.

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

About Us

"It's about Microsoft Excel"