LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default how get cell value from different worksheet?

maybe

select case [sheet1!a1]

"Ian Elliott" wrote in message
...
Thanks in advance.
I have a macro in Worksheet_SelectionChange, so it runs
every time I change the selection, and I want to get a
value from a cell in another worksheet. I figure if I have
to, I can do this by changing worksheets (Worksheets
("Sheet1").Activate) and then getting the 'Cells
(x,y).value', but is there another way I can do this so I
don't have to change worksheets (and save processing
time)? Something like Worksheets("Sheet1").Cells
(x,y).Value (but which doesn't exist).
My code is (this is Sheet4)
Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
'get value of row 1,col 1 cell value of sheet1, let = x.
Select Case x
Case "A"
'code here
Case "B"
'code here
End Select
End Sub
Thanks again.



 
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
Linking Tab/worksheet names to a worksheet cell LinLin Excel Discussion (Misc queries) 3 March 9th 09 03:31 PM
populate cell on worksheet 2 if text is red on worksheet 1 SCrowley Excel Worksheet Functions 14 May 15th 07 09:28 PM
Variable worksheet name (tab) linked to cell in same worksheet azbob Excel Worksheet Functions 6 January 9th 07 06:27 PM
How do I copy a date in a worksheet cell to another worksheet? JennLee Excel Worksheet Functions 3 February 17th 06 05:38 PM
How can I link cell colours from worksheet to worksheet/workbook? Evelyn Excel Worksheet Functions 1 July 5th 05 09:16 PM


All times are GMT +1. The time now is 04:03 PM.

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

About Us

"It's about Microsoft Excel"