Question about SHeet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I usually write Sheet1.*** in vba rather than Sheets("Data").***

This works most of the time, however sometimes the Sheet1. throws an error that says object cannot be found. Why does this work sometimes and not others? To solve it i have to write Sheets("Data")

Thanks in advance
JAmes
 
Hi
probably thoug your sheet 'data' is the first sheet it does not have
the codename 'sheet1'. Have a look in the VBA project explorer if sheet
'data' really has the codename sheet1
 

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