Thread: set error
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default set error

1) Set tableB = Worksheets(mm).Range("a1:g1000")

2) Set tableB = Worksheets(mm).Cells

--

HTH

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


"tango" wrote in message
om...
*incorrect
mm = ("Sheet" & 3)
Set tableB = mm.Range("a1:g1000")

1)i got runtime error 424 object required. why? because the sheet
number is enter by user in the inputbox and i do not want to hardcode
it. pls help
2) instead of putting ("a1:g1000") what should i put for ranging whole
worksheet?


*correct
set tableB = sheet3.range("a1:g1000")