VBA setting range in another sheet

J

Jeff

I want to save the value in tab="Database" to a variable.

But I don't want to activate the sheet everytime, since this seems to slow
things down a lot.

So originally I was writing:

Sheets("Database").select
X = Range("F4").Value

But is there another way to set X=Range F4, without selecting the sheet?

Thanks
 
B

Bob Phillips

Good man!

X = Sheets("Database").Range("F4").Value

--

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

Top