Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Error in Range Statement

Does anyone know why this gives an error?

Worksheets(strWrkSht).Range(Cells(2, 2), Cells(intCopyTo,
intCopyTo1)).Select

--
M. Shipp
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Error in Range Statement

Works fine for me (XL2k). Would suggest either a Debug.Print or MsgBox
statement for each variable before this line to verify that each variable
does indeed have the expected value.

Ed

"SHIPP" wrote in message
...
Does anyone know why this gives an error?

Worksheets(strWrkSht).Range(Cells(2, 2), Cells(intCopyTo,
intCopyTo1)).Select

--
M. Shipp



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Error in Range Statement

What error does it give?

What values are in strWrkSht, intCopyTo, intCopyTo1? Does that worksheet
exist?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"SHIPP" wrote in message
...
Does anyone know why this gives an error?

Worksheets(strWrkSht).Range(Cells(2, 2), Cells(intCopyTo,
intCopyTo1)).Select

--
M. Shipp



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Error in Range Statement

You may have missed one reply at your first post:
http://groups.google.co.uk/groups?th...apeXSPAM.c om



SHIPP wrote:

Does anyone know why this gives an error?

Worksheets(strWrkSht).Range(Cells(2, 2), Cells(intCopyTo,
intCopyTo1)).Select

--
M. Shipp


--

Dave Peterson
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
Function Error IF Statement Bob Zimmerman Excel Worksheet Functions 3 May 12th 10 01:46 PM
If Statement Error Kiley Excel Discussion (Misc queries) 3 May 18th 09 10:25 PM
Can't fix On Error statement austris Excel Discussion (Misc queries) 7 October 13th 06 07:09 AM
IF statement error D Excel Discussion (Misc queries) 4 October 4th 06 04:28 PM
On Error Statement Heapy Excel Programming 1 September 22nd 03 05:22 PM


All times are GMT +1. The time now is 04:09 AM.

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"