Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default visual basic - select/activate but don't show sheets


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default visual basic - select/activate but don't show sheets

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


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

"Donna Edwards" <Donna wrote in message
...

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


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
Using visual basic to select what paper to print on Amanda Excel Discussion (Misc queries) 0 November 9th 05 04:40 AM
Activate check "Trust access to Visual Basic " in Excel Pablo via OfficeKB.com New Users to Excel 1 June 23rd 05 04:30 PM


All times are GMT +1. The time now is 09:12 PM.

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"