View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Refering to Cell's Name in Macro

I don't believed I used tunneling as you have: [nRange]

Tunneling, while much slower, is perhaps less susceptible to this.

If you have never had a problem with references to other sheets in a sheet
module, god bless you. People post here all the time with such problems.

Regards,
Tom Ogilvy


Thomas wrote in message ...
I can't duplicate that.In sheet1 I name A1 as nRange
In Sheet1 module I have a sub with:
activecell.value = [nRange]
In sheet3 I call the sub.
It returns the value from nRange to the activecell without prefacing
with the sheet name.
OfficeXP

Tom Ogilvy wrote:

brkCom = Range("Brokerage_Commission").Value

if you will be doing this in a sheet module and brokerage_commission is

on
another sheet, you need to preface it with the sheetname. Assume
Brokerage_Commission is on sheet3.

brkCom = Worksheets("sheet3").Range("Brokerage_Commission") .Value

--
Regards,
Tom Ogilvy

LSB wrote in message
...
I am trying to work on some calculation in my macro. I
have named one the cells as "Brokerage_Commission" in, in
my Macro I would like to get this value to multiply with
another value. How can I refer the "Brokerage_Commission"
in my macro. The Brokerage_Commission is in different
worksheet as I want to put the result in another worksheet.

Please help.

Thanks.