Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Cell Reference on a different sheet
I'm trying to use this code
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim MyCell As String 'Change callout here as desired MyCell = "Z1" If Range(MyCell).ValueThen Exit Sub Else MsgBox "Please use a value of ""P"" or ""F"" in appropriate cells!", , "Invalid Entry" End If End Sub Which works fine if Z1 is on the current sheet (Sheet 1). But I want to reference a cell on a different sheet (Sheet 3) in the same workbook. How do I do this? MyCell = "Sheet3!Z1" MyCell = "'Sheet3!'Z1" doesn't work... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Nesting a sheet name reference within a cell reference??? | Excel Discussion (Misc queries) | |||
multiple cell reference from sheet to sheet | Excel Worksheet Functions | |||
Changing sheet reference to cell reference | Excel Worksheet Functions | |||
Cell to reference sheet tab name | Excel Discussion (Misc queries) | |||
Is is possible for a cell to reference it's "sheet name"? | Excel Worksheet Functions |