View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Capturing the column number and # of columns in a selection

To get the first column of the selection, use

Dim ColNum As Integer
ColNum = Selection.Cells(1,1).Column

To get the number of columns selected, use

Dim ColCount As Integer
ColCount = Selection.Columns.Count


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Ralph Heidecke" wrote in message
...
What is the best way to capture the number of the 1st column
and the number
of columns of an area selected by a user?