kevininstructor@state.or.us
Guest
Re: LastColumn used as letter(s) in VBA
I should have realized the "_" but don't typically break code on more then
one line beings all developers have 21" dual monitors. Concerning the need
to convert the numeric to a letter, not something I ever needed before but
it's for working with a type library in another programming language.
"Tom Ogilvy" <twogilvy@msn.com> wrote in message
news:eQ2%23%23YWFFHA.3908@TK2MSFTNGP12.phx.gbl...
> Mika meant it to be one statement continued on a second line:
>
> var = ActiveSheet.UsedRange.Address( _
> ReferenceStyle:=xlA1)
>
> would work as well.
>
> Also, I have never seen a need to convert a column number to a letter -
are
> you sure you need to.
> --
> Regards,
> Tom Ogilvy
>
> "kevininstructor@state.or.us" <Kevin.S.Gallagher@state.or.us> wrote in
> message news:u9v9BtTFFHA.2156@TK2MSFTNGP10.phx.gbl...
> > Mika,
> >
> > Excellent! One question, I am using version 2002 and had to change the
> code
> > to below lose the "_" preciding ReferenceStyle to run.
> >
> > var = ActiveSheet.UsedRange.Address(ReferenceStyle:=xlA1)
> >
> > Any reason why?
> >
> > Many thanks,
> > Kevin
> >
> >
> >
> > "Mika" <rigel_58@yahoo.com> wrote in message
> > news:1108675845.388573.299190@c13g2000cwb.googlegroups.com...
> > Hi,
> >
> > You don´t need to convert, use something like:
> > var = ActiveSheet.UsedRange.Address _ReferenceStyle:=xlA1)
> >
> > and then with the text functions (mid, left, etc) you can extract form
> > var the column letter you need.
> >
> > Rg
> > Mika
> >
> >
>
>
Bookmarks