Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

visual basic - select/activate but don't show sheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Donna Edwards - 11 Nov 2007 17:32 GMT
Hi,
I'm trying to make a nice user interface on one worksheet.  When I access
cells in other worksheets using select or activate, the view automatically
switches to the other worksheet.  Is there any way for me to get the values
in cells on other sheets, but keep the view on my one user interface
worksheet?
Thanks in advance for any help.
Donna
Chip Pearson - 11 Nov 2007 17:44 GMT
You (almost) never need to Activate or Select anything in Excel/VBA. Just
reference the cell directly:

Dim V As Variant
V = Worksheets("SomeSheet").Range("A10").Value
Worksheets("SomeOtherSheet").Range("B20").Value = V

or, as a one liner

Worksheets("SomeOtherSheet").Range("B20").Value = _
   Worksheets("SomeSheet").Range("A10").Value

Signature

Cordially,
Chip Pearson
Microsoft MVP  - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

> Hi,
> I'm trying to make a nice user interface on one worksheet.  When I access
[quoted text clipped - 5 lines]
> Thanks in advance for any help.
> Donna
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.