set error

  • Thread starter Thread starter tango
  • Start date Start date
T

tango

*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")
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top