View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default Refer to first cell in range

Maybe this will help you:

fCell = Selection.Cells(1, 1).Address
If Selection.Columns.Count 1 Then
' more than one column was selected
msg = MsgBox("You can only select one column", vbInformation,
"Invalid selection")
Exit Sub
End If

Regards,
Per

On 2 Nov., 17:48, art wrote:
Hello:

I have a userform with a refedit. I need to refer to the first cell (top) in
the rnage how can I refer to it?

Also How can I retrict the user to select only 1 column at a time, meaning
he can select a range from column C from row 1 to row 10000... but he cannot
also select C1 to D5?

Thanks