Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation list from another sheet 1

Status
Not open for further replies.

lovalles

IS-IT--Management
Sep 20, 2001
262
US
i have done this

Public myrange As Range
Private Sub Workbook_Open()
Set myrange = Worksheets("Sheet1").Range("A1:A10")

End Sub

i got to sheet2 select the cell
Data>Validation>List
and type
=myrange
but i get the A named Range you specified cannot be found?

how should i do this the right way.
thanks

lovalles
 
Hi,

Here's what your code should have stated...
Code:
ActiveWorkbook.Names.Add Name:="MyRange", RefersTo:="=Sheet1!" & Range("A1:A10").Address
All you did was set a range object named MyRange. You did not add it to the Names Collection so that it could be used on a worksheet.
:)

Skip,
Skip@TheOfficeExperts.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top