Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
when I sort it tells me to select a single cell, even though I did boombox Excel Discussion (Misc queries) 2 September 17th 09 10:56 PM
select a single cell in excel 07, currently selecting a goup pjrick Excel Discussion (Misc queries) 2 July 8th 09 07:53 PM
Using mouse to select a single cell within the worksheet Mike B. Excel Discussion (Misc queries) 1 July 30th 07 01:52 AM
I cannot select a single cell or pull down cell contents Carolyn Fahm Excel Worksheet Functions 0 January 24th 06 04:54 PM
RefEdit - cannot select range on another workbook Rob Excel Programming 1 November 26th 03 07:48 PM


All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"