View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Error on select statement

Try putting Master in quotes i.e. strWrkSht = "Master"

"SHIPP" wrote:

I am working in Excel 97 and am getting a 1004 error - Application defined or
object defined error. The code is

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

I have stepped through the code to determine the value of the variables:

intCopyTo1=211
intCopyTo = 6
strWrkSht=Master

All variables are accurate. Any help would be appreciated.
--
M. Shipp