refferencing named range in different workbook

M

Mark Kubicki

what am I getting wrong,?

the desired result is the value of the named range in a different workbook
which is hidden, but open...

in the different workbook: Job Nos for Timesheets.xls,
on worksheet: Billing Rates,
a named range is defined as: RateDesigner = 'Billing Rates'!$C$13

the code that is failing is:

Dim curFeeRate As Currency
Dim rngFeeRate as Range
....
set rngFeeRate = Range("Job Nos for
Timesheets.xls!RateDesigner")
feerate = rngFeeRate.value


some of the other variations have been:
Range("[Job Nos for Timesheets.xls]!RateDesigner")
Range("[Job Nos for Timesheets.xls]Billing Rates!RateDesigner")
Range("workbooks(Job Nos for Timesheets.xls).worksheets(Billing
Rates).!RateDesigner")


thanks in advance...
 
V

Vasant Nanavati

Try:

Workbooks("Job Nos for Timesheets.xls").Worksheets("Billing
Rates").Range("RateDesigner")
 
M

mudraker

Workbooks("NameBook1").Worksheets("name1").Range("Name1").value
"Data"

or


Workbooks("NameBook1").Worksheets("name1").Range("Name1").value
Workbooks("NameBook2").Worksheets("name2").Range("Name2").value
"Data"

or

Dim wsBook2 as Worksheet
wsBook2 = WorkBooks("Name2").WorkSheets("Name2")

wsBook2.Range("A1").Value = "Data
 
T

Tom Ogilvy

set rng = Workbooks("Job Nos for
Timesheets.xls").Names("RateDesigner").RefersToRange
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top