Consulting

Results 1 to 6 of 6

Thread: Solved: how range is defined for a worksheet?

  1. #1

    Solved: how range is defined for a worksheet?

    I have this exel file with one worksheet. In the codes wriiten in the module there are:
    .Temperature.SetValue Range("FeedTemp").Value, "C"
    .Pressure.SetValue Range("FeedPres").Value, "bar"
    .MolarFlow.SetValue Range("FeedFlow").Value, "kgmole/h"

    I am confused how does FeedTemp replace for C15? where is it defined that FeedTemp is C15?

  2. #2
    Administrator
    Chat VP
    VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    Those are 'named ranges'. Go into Insert > Name > Define and you'll see the named ranges there (for more, read Help about this)
    You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you

    The major part of getting the right answer lies in asking the right question...


    Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.

  3. #3
    thank you. now I can understand.

  4. #4
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    For all you need to know about Range Names (and maybe a bit more)
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    One other point, Name Management in Excel is absolute garbage. Even 2007 with its so-called Name Manager function is rubbish.

    But luckily, there is a much better tool out there, and best of all is that it is free. You can find it at my good friend Jan Karel Pietrse's site, at http://www.jkp-ads.com/OfficeMarketPlaceNM-EN.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •