Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If a worksheet is set to use R1C1 notation, the entry in a refedit control
is in that notation when the user selects a cell. However the following does not work: dim selectedR as range Set selectedR = Range(userform1.refedit1.text) because of the R1C1 notation. The only solution I see is to check the notation, set it to A1 notation, display the userform, get the information, and then set the notation back to R1C1. Is there a better way? Bob |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bob. How about..
Dim s As String, selectedR As Range s = UserForm1.RefEdit1.Text If Application.ReferenceStyle = xlR1C1 Then Set selectedR = Range(Application.ConvertFormula(s, xlR1C1, xlA1)) Else Set selectedR = Range(s) End If -- Tim Zych http://www.higherdata.com Workbook Compare - free and pro versions "Robert Flanagan" wrote in message ... If a worksheet is set to use R1C1 notation, the entry in a refedit control is in that notation when the user selects a cell. However the following does not work: dim selectedR as range Set selectedR = Range(userform1.refedit1.text) because of the R1C1 notation. The only solution I see is to check the notation, set it to A1 notation, display the userform, get the information, and then set the notation back to R1C1. Is there a better way? Bob |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tim. That's a better solution than changing the setting.
Bob "Tim Zych" <tzych@nospam at earthlink dot net wrote in message ... Hi Bob. How about.. Dim s As String, selectedR As Range s = UserForm1.RefEdit1.Text If Application.ReferenceStyle = xlR1C1 Then Set selectedR = Range(Application.ConvertFormula(s, xlR1C1, xlA1)) Else Set selectedR = Range(s) End If -- Tim Zych http://www.higherdata.com Workbook Compare - free and pro versions "Robert Flanagan" wrote in message ... If a worksheet is set to use R1C1 notation, the entry in a refedit control is in that notation when the user selects a cell. However the following does not work: dim selectedR as range Set selectedR = Range(userform1.refedit1.text) because of the R1C1 notation. The only solution I see is to check the notation, set it to A1 notation, display the userform, get the information, and then set the notation back to R1C1. Is there a better way? Bob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumproduct with A1 notation instead of R1C1 | Excel Programming | |||
R1C1 Notation in VBA | Excel Programming | |||
Using Range with R1C1 notation in a macro | Excel Programming | |||
R1C1 Notation | Excel Programming |