Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default Is column selected

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

TIA

josh


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default Is column selected

Hi Josh

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

returns true if an entirecolumn is selected

--
XL2002
Regards

William



"Josh Sale" <jsale@tril dot cod wrote in message
...
| Is there some simple way in VBA to tell if the user has selected an entire
| column?
|
| TIA
|
| josh
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Is column selected

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
_ _
^ąŻ^
--



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default Is column selected

William, Soo,

Thanks for the insight! I like it.

Thanks,

josh


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
Protect selected column Fareez Excel Discussion (Misc queries) 1 February 20th 09 06:50 AM
HOW DO I ALPHABETIZ A SELECTED COLUMN Ann Longley Excel Worksheet Functions 1 May 22nd 06 05:16 PM
getting value 1 column to right of cell selected in pulldown Gary D. Excel Worksheet Functions 2 December 19th 05 12:59 AM
Add selected numbers in a column that are a different color Sam Excel Discussion (Misc queries) 6 March 4th 05 11:46 PM
how to know the column/row of a selected cell in vba? daryl Excel Programming 4 May 5th 04 03:59 PM


All times are GMT +1. The time now is 12:49 PM.

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"