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

J

Jos Vens

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
 
B

Bob Phillips

How about

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

--

HTH

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

Jos Vens

Hi Bob,

small correction

sParameters.Range(vName).Column

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


Jos
 
B

Bob Phillips

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)
 
J

Jos Vens

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
 

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