View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] ksgoodwin@gmail.com[_2_] is offline
external usenet poster
 
Posts: 3
Default Access Named range value with multiple workbooks open

I am trying to access the value in a single cell that is a named range.

Code:

If Workbooks(Current).Names("UpDate_File_Name1").Valu e = "Save to" then
....

When I debug the .Value I get the cell address not the cell value; in
this case:

=Setup!$C$3 instead of "Save to" which is the value in the cell.

I can do:

If Activeworkbook.Worksheets("Setup").cells(3,3).valu e = "Save to"
then...

or

If Workbooks(Current).Worksheets("Setup").Cells(3, 3).Value = "Save to"
then...

and get the Value to be: "Save to"

I would like to use Named ranges in the VBA code.

Ken