Is column selected

  • Thread starter Thread starter Josh Sale
  • Start date Start date
J

Josh Sale

Is there some simple way in VBA to tell if the user has selected an entire
column?

TIA

josh
 
Hi Josh

MsgBox Selection.Rows.Count = ActiveSheet.Rows.Count

returns true if an entirecolumn is selected

--
XL2002
Regards

William

(e-mail address removed)

| Is there some simple way in VBA to tell if the user has selected an entire
| column?
|
| TIA
|
| josh
|
|
 
Hi,

Sub TEST()

If TypeName(Selection) = "Range" Then
If Selection.Areas.Count = 1 Then
If Selection.Areas(1).Rows.Count = Rows.Count Then
MsgBox "OK"
End If
End If
End If

End Sub


--
Regards,
Soo Cheon Jheong
_ _
^¢¯^
--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top