Is column selected

J

Josh Sale

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

TIA

josh
 
W

William

Hi Josh

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

returns true if an entirecolumn is selected

--
XL2002
Regards

William

[email protected]

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

Soo Cheon Jheong

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
_ _
^¢¯^
--
 
Top