ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Column of a defined name (office 2000 vs XP)? (https://www.excelbanter.com/excel-programming/325467-column-defined-name-office-2000-vs-xp.html)

Jos Vens[_2_]

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

this works in office XP

vAddress =
Workbooks(sParameters.Parent.Name).Names(vName).Re fersTo
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



Bob Phillips[_6_]

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

Workbooks(sParameters.Parent.Name).Range(vName).Co lumn

--

HTH

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


"Jos Vens" wrote in message
...
Hi,

this works in office XP

vAddress =
Workbooks(sParameters.Parent.Name).Names(vName).Re fersTo
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





Jos Vens[_2_]

Column of a defined name (office 2000 vs XP)?
 
Thanks a lot Bob,

it works (and is much simpler)!

Jos


"Bob Phillips" schreef in bericht
...
How about

Workbooks(sParameters.Parent.Name).Range(vName).Co lumn

--

HTH

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


"Jos Vens" wrote in message
...
Hi,

this works in office XP

vAddress =
Workbooks(sParameters.Parent.Name).Names(vName).Re fersTo
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







Jos Vens[_2_]

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" schreef in bericht
...
How about

Workbooks(sParameters.Parent.Name).Range(vName).Co lumn

--

HTH

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


"Jos Vens" wrote in message
...
Hi,

this works in office XP

vAddress =
Workbooks(sParameters.Parent.Name).Names(vName).Re fersTo
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







Bob Phillips[_6_]

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).Re fersTo
vCol = Range(vAddress).Column


--

HTH

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


"Jos Vens" wrote in message
...
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" schreef in bericht
...
How about

Workbooks(sParameters.Parent.Name).Range(vName).Co lumn

--

HTH

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


"Jos Vens" wrote in message
...
Hi,

this works in office XP

vAddress =
Workbooks(sParameters.Parent.Name).Names(vName).Re fersTo
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









Jos Vens[_2_]

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" schreef in bericht
...
Hi Jos,

So how did this ever work inn XP?

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


--

HTH

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


"Jos Vens" wrote in message
...
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" schreef in bericht
...
How about

Workbooks(sParameters.Parent.Name).Range(vName).Co lumn

--

HTH

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


"Jos Vens" wrote in message
...
Hi,

this works in office XP

vAddress =
Workbooks(sParameters.Parent.Name).Names(vName).Re fersTo
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












All times are GMT +1. The time now is 07:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com