Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jeff
 
Posts: n/a
Default VBA setting range in another sheet

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
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Good man!

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

--

HTH

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


"Jeff" wrote in message
...
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



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

Dim X as Variant
x = worksheets("database").range("f4").value





Jeff wrote:

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


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting data on protected worksheet Sue Excel Discussion (Misc queries) 20 November 7th 06 07:31 PM
Setting the magnification to a range of cell's ceemo Excel Discussion (Misc queries) 3 August 19th 05 01:53 PM
Cell linked to a range of cell values in different sheet szeng Excel Discussion (Misc queries) 1 August 9th 05 02:41 AM
Copying multiple sheets from one book 2 another and undertake spec Pank Mehta Excel Discussion (Misc queries) 14 March 16th 05 04:41 PM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM


All times are GMT +1. The time now is 04:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"