Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Use a RefEdit to select a single cell
Hello NG,
I wanted to use RefEdit in a userform to allow user to select just a single cell (not a range). Is this possible? How? Please help TIA Jon-jon |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Use a RefEdit to select a single cell
Hi
AFAIK you can't restrict the selection BUT you can test the returned result afterwards if it is only a 1*1 range -- Regards Frank Kabel Frankfurt, Germany JON JON wrote: Hello NG, I wanted to use RefEdit in a userform to allow user to select just a single cell (not a range). Is this possible? How? Please help TIA Jon-jon |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Use a RefEdit to select a single cell
Or just use the top left cell of the first area in the range.
Option Explicit Private Sub CommandButton1_Click() Dim myCell As Range Set myCell = Nothing On Error Resume Next Set myCell = Range(Me.RefEdit1.Value).Areas(1).Cells(1) On Error GoTo 0 If myCell Is Nothing Then MsgBox "please select a range" Else MsgBox myCell.Address End If End Sub JON JON wrote: Hello NG, I wanted to use RefEdit in a userform to allow user to select just a single cell (not a range). Is this possible? How? Please help TIA Jon-jon -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Use a RefEdit to select a single cell
Thank you, Dave and Frank
I follow Frank advise. Warm regards, Jon-jon "Dave Peterson" wrote in message ... Or just use the top left cell of the first area in the range. Option Explicit Private Sub CommandButton1_Click() Dim myCell As Range Set myCell = Nothing On Error Resume Next Set myCell = Range(Me.RefEdit1.Value).Areas(1).Cells(1) On Error GoTo 0 If myCell Is Nothing Then MsgBox "please select a range" Else MsgBox myCell.Address End If End Sub JON JON wrote: Hello NG, I wanted to use RefEdit in a userform to allow user to select just a single cell (not a range). Is this possible? How? Please help TIA Jon-jon -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
when I sort it tells me to select a single cell, even though I did | Excel Discussion (Misc queries) | |||
select a single cell in excel 07, currently selecting a goup | Excel Discussion (Misc queries) | |||
Using mouse to select a single cell within the worksheet | Excel Discussion (Misc queries) | |||
I cannot select a single cell or pull down cell contents | Excel Worksheet Functions | |||
RefEdit - cannot select range on another workbook | Excel Programming |