Hi.
I have a range object. I want to determine the:
"A1:C10"
Format of the range. How do I get that?
Thanks
Hi.
I have a range object. I want to determine the:
"A1:C10"
Format of the range. How do I get that?
Thanks
Function test(a As Range) As String
test = Replace(a.Address, "$", "")
End Function
--
Kind regards,
Niek Otten
"Raph" <[email protected]> wrote in message
news:[email protected]...
> Hi.
> I have a range object. I want to determine the:
>
> "A1:C10"
>
> Format of the range. How do I get that?
>
> Thanks
I should have prefaced. I'm not using VBA, rather C# in an AddIn.
"Niek Otten" wrote:
> Function test(a As Range) As String
> test = Replace(a.Address, "$", "")
> End Function
>
> --
> Kind regards,
>
> Niek Otten
>
> "Raph" <[email protected]> wrote in message
> news:[email protected]...
> > Hi.
> > I have a range object. I want to determine the:
> >
> > "A1:C10"
> >
> > Format of the range. How do I get that?
> >
> > Thanks
>
>
>
dim myRng as range
set myrng = activesheet.range("a1:C10")
msgbox myrng.address(0,0)
Take a look in VBA's help for .address.
Raph wrote:
>
> Hi.
> I have a range object. I want to determine the:
>
> "A1:C10"
>
> Format of the range. How do I get that?
>
> Thanks
--
Dave Peterson
No, I want "ROWNUMBER:COLNUMBER" format for a selected range.
I don't know the "A1:C1" in my example. I want to determine that string.
"Dave Peterson" wrote:
> dim myRng as range
> set myrng = activesheet.range("a1:C10")
> msgbox myrng.address(0,0)
>
> Take a look in VBA's help for .address.
>
> Raph wrote:
> >
> > Hi.
> > I have a range object. I want to determine the:
> >
> > "A1:C10"
> >
> > Format of the range. How do I get that?
> >
> > Thanks
>
> --
>
> Dave Peterson
>
That was just the way I tested the function. myRng could have been set to
anything.
And what does rownumber:colnumber mean?
if you mean R1C1 reference style:
MsgBox myRng.Address(ReferenceStyle:=xlR1C1)
Raph wrote:
>
> No, I want "ROWNUMBER:COLNUMBER" format for a selected range.
> I don't know the "A1:C1" in my example. I want to determine that string.
>
> "Dave Peterson" wrote:
>
> > dim myRng as range
> > set myrng = activesheet.range("a1:C10")
> > msgbox myrng.address(0,0)
> >
> > Take a look in VBA's help for .address.
> >
> > Raph wrote:
> > >
> > > Hi.
> > > I have a range object. I want to determine the:
> > >
> > > "A1:C10"
> > >
> > > Format of the range. How do I get that?
> > >
> > > Thanks
> >
> > --
> >
> > Dave Peterson
> >
--
Dave Peterson
That was just the way I tested the function. myRng could have been set to
anything.
And what does rownumber:colnumber mean?
if you mean R1C1 reference style:
MsgBox myRng.Address(ReferenceStyle:=xlR1C1)
Raph wrote:
>
> No, I want "ROWNUMBER:COLNUMBER" format for a selected range.
> I don't know the "A1:C1" in my example. I want to determine that string.
>
> "Dave Peterson" wrote:
>
> > dim myRng as range
> > set myrng = activesheet.range("a1:C10")
> > msgbox myrng.address(0,0)
> >
> > Take a look in VBA's help for .address.
> >
> > Raph wrote:
> > >
> > > Hi.
> > > I have a range object. I want to determine the:
> > >
> > > "A1:C10"
> > >
> > > Format of the range. How do I get that?
> > >
> > > Thanks
> >
> > --
> >
> > Dave Peterson
> >
--
Dave Peterson
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks