Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default vba copy code

this code is in sheet1; and the last line, before end sub,
produces an "application defined or object defined error".
can someone tell me why?

Sub x10()
Dim COUNTER1 As Integer
Dim COUNTER2 As Integer

COUNTER1 = [A1]
COUNTER2 = [B1]


Range(Cells(COUNTER1, 1), Cells(COUNTER1, 71)).Copy _
Worksheets("SHEET2").Range(Cells(COUNTER2, 1))

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default vba copy code

Sub x10()
Dim COUNTER1 As Integer
Dim COUNTER2 As Integer

COUNTER1 = [A1]
COUNTER2 = [B1]


Range(Cells(COUNTER1, 1), Cells(COUNTER1, 71)).Copy _
Worksheets("SHEET2").Cells(COUNTER2, 1)

End Sub

--
Regards,
Tom Ogilvy

"Paul" wrote in message
...
this code is in sheet1; and the last line, before end sub,
produces an "application defined or object defined error".
can someone tell me why?

Sub x10()
Dim COUNTER1 As Integer
Dim COUNTER2 As Integer

COUNTER1 = [A1]
COUNTER2 = [B1]


Range(Cells(COUNTER1, 1), Cells(COUNTER1, 71)).Copy _
Worksheets("SHEET2").Range(Cells(COUNTER2, 1))

End Sub



Reply
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
copy and use vba code Giz New Users to Excel 6 November 24th 06 11:39 PM
copy and use vba code Giz Excel Discussion (Misc queries) 9 November 22nd 06 09:57 PM
Help with COPY code JVLin Excel Discussion (Misc queries) 0 March 6th 05 03:33 PM
Copy Code Soniya Excel Programming 5 October 6th 04 03:10 PM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Excel Programming 1 April 15th 04 08:34 PM


All times are GMT +1. The time now is 05:00 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"