Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi.
I have a range object. I want to determine the: "A1:C10" Format of the range. How do I get that? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Function test(a As Range) As String
test = Replace(a.Address, "$", "") End Function -- Kind regards, Niek Otten "Raph" wrote in message ... Hi. I have a range object. I want to determine the: "A1:C10" Format of the range. How do I get that? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... Hi. I have a range object. I want to determine the: "A1:C10" Format of the range. How do I get that? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Convert range values to correct "hh:mm:ss" format. | Excel Programming | |||
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" | Excel Programming | |||
Using "Cells" to write "Range("A:A,H:H").Select" | Excel Programming |