ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error in Range Statement (https://www.excelbanter.com/excel-programming/324749-error-range-statement.html)

SHIPP

Error in Range Statement
 
Does anyone know why this gives an error?

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

--
M. Shipp

Ed

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




Bob Phillips[_6_]

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




Dave Peterson[_5_]

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


All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com