+ Reply to Thread
Results 1 to 6 of 6

Column of a defined name (office 2000 vs XP)?

  1. #1
    Jos Vens
    Guest

    Column of a defined name (office 2000 vs XP)?

    Hi,

    this works in office XP

    vAddress =
    Workbooks(sParameters.Parent.Name).Names(vName).RefersTo
    vCol = Range(vAddress).Column

    but not in office 2000. There must be an incompatibility, I guess.

    How can I know the column-number of a named range in Office 2000?

    Thanks
    Jos Vens



  2. #2
    Bob Phillips
    Guest

    Re: Column of a defined name (office 2000 vs XP)?

    How about

    Workbooks(sParameters.Parent.Name).Range(vName).Column

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Jos Vens" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > this works in office XP
    >
    > vAddress =
    > Workbooks(sParameters.Parent.Name).Names(vName).RefersTo
    > vCol = Range(vAddress).Column
    >
    > but not in office 2000. There must be an incompatibility, I guess.
    >
    > How can I know the column-number of a named range in Office 2000?
    >
    > Thanks
    > Jos Vens
    >
    >




  3. #3
    Jos Vens
    Guest

    Re: Column of a defined name (office 2000 vs XP)?

    Thanks a lot Bob,

    it works (and is much simpler)!

    Jos


    "Bob Phillips" <[email protected]> schreef in bericht
    news:%[email protected]...
    > How about
    >
    > Workbooks(sParameters.Parent.Name).Range(vName).Column
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Jos Vens" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi,
    >>
    >> this works in office XP
    >>
    >> vAddress =
    >> Workbooks(sParameters.Parent.Name).Names(vName).RefersTo
    >> vCol = Range(vAddress).Column
    >>
    >> but not in office 2000. There must be an incompatibility, I guess.
    >>
    >> How can I know the column-number of a named range in Office 2000?
    >>
    >> Thanks
    >> Jos Vens
    >>
    >>

    >
    >




  4. #4
    Jos Vens
    Guest

    Re: Column of a defined name (office 2000 vs XP)?

    Hi Bob,

    small correction

    sParameters.Range(vName).Column

    where sParameters is a pointer to a sheet. With workbooks, it does not
    work!


    Jos


    "Bob Phillips" <[email protected]> schreef in bericht
    news:%[email protected]...
    > How about
    >
    > Workbooks(sParameters.Parent.Name).Range(vName).Column
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Jos Vens" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi,
    >>
    >> this works in office XP
    >>
    >> vAddress =
    >> Workbooks(sParameters.Parent.Name).Names(vName).RefersTo
    >> vCol = Range(vAddress).Column
    >>
    >> but not in office 2000. There must be an incompatibility, I guess.
    >>
    >> How can I know the column-number of a named range in Office 2000?
    >>
    >> Thanks
    >> Jos Vens
    >>
    >>

    >
    >




  5. #5
    Bob Phillips
    Guest

    Re: Column of a defined name (office 2000 vs XP)?

    Hi Jos,

    So how did this ever work inn XP?

    vAddress =
    Workbooks(sParameters.Parent.Name).Names(vName).RefersTo
    vCol = Range(vAddress).Column


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Jos Vens" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Bob,
    >
    > small correction
    >
    > sParameters.Range(vName).Column
    >
    > where sParameters is a pointer to a sheet. With workbooks, it does not
    > work!
    >
    >
    > Jos
    >
    >
    > "Bob Phillips" <[email protected]> schreef in bericht
    > news:%[email protected]...
    > > How about
    > >
    > > Workbooks(sParameters.Parent.Name).Range(vName).Column
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "Jos Vens" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> Hi,
    > >>
    > >> this works in office XP
    > >>
    > >> vAddress =
    > >> Workbooks(sParameters.Parent.Name).Names(vName).RefersTo
    > >> vCol = Range(vAddress).Column
    > >>
    > >> but not in office 2000. There must be an incompatibility, I guess.
    > >>
    > >> How can I know the column-number of a named range in Office 2000?
    > >>
    > >> Thanks
    > >> Jos Vens
    > >>
    > >>

    > >
    > >

    >
    >




  6. #6
    Jos Vens
    Guest

    Re: Column of a defined name (office 2000 vs XP)?

    Hi Bob,

    it worked!

    I guess because the RefersTo gives a string, and the Range of a
    string-address has a property column in XP?

    It's the "vCol = Range(vAddress).Column" that gave an error in Office 2000,
    but the on error resume next set up a trap for me, I thougt it worked.

    Jos

    "Bob Phillips" <[email protected]> schreef in bericht
    news:%[email protected]...
    > Hi Jos,
    >
    > So how did this ever work inn XP?
    >
    > vAddress =
    > Workbooks(sParameters.Parent.Name).Names(vName).RefersTo
    > vCol = Range(vAddress).Column
    >
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Jos Vens" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi Bob,
    >>
    >> small correction
    >>
    >> sParameters.Range(vName).Column
    >>
    >> where sParameters is a pointer to a sheet. With workbooks, it does not
    >> work!
    >>
    >>
    >> Jos
    >>
    >>
    >> "Bob Phillips" <[email protected]> schreef in bericht
    >> news:%[email protected]...
    >> > How about
    >> >
    >> > Workbooks(sParameters.Parent.Name).Range(vName).Column
    >> >
    >> > --
    >> >
    >> > HTH
    >> >
    >> > RP
    >> > (remove nothere from the email address if mailing direct)
    >> >
    >> >
    >> > "Jos Vens" <[email protected]> wrote in message
    >> > news:[email protected]...
    >> >> Hi,
    >> >>
    >> >> this works in office XP
    >> >>
    >> >> vAddress =
    >> >> Workbooks(sParameters.Parent.Name).Names(vName).RefersTo
    >> >> vCol = Range(vAddress).Column
    >> >>
    >> >> but not in office 2000. There must be an incompatibility, I guess.
    >> >>
    >> >> How can I know the column-number of a named range in Office 2000?
    >> >>
    >> >> Thanks
    >> >> Jos Vens
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1