LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Detect if current select is a row

Why test if the entire row is selected when you can force the selection of
the entire row; something like this...

' Ask user to select the row as you do now, then run this code
If Selection.Columns = 1 Then
Selection.EntireRow.Select
'
' the rest of your code goes here
'
Else
MsgBox "You selected more than one row!"
End If

Although I'm willing to bet that you don't really need to perform the
selection operation as opposed to simply working with the range itself in
code.

--
Rick (MVP - Excel)


"Billy B" wrote in message
...
Is it possible to test to see if the current selection is a row? I have a
command button that is designed to delete the selected row but but I need
to
test to see if it is selected before running the rest of the macro.

Thank you.




 
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
how to select current sheet tab Knox Excel Programming 11 March 7th 07 01:54 PM
Select Current Row achidsey[_2_] Excel Programming 3 September 15th 06 01:39 PM
How do I detect and commit the current cell edition? [email protected] Excel Programming 5 April 11th 06 04:40 AM
how to select current range mikerr Excel Programming 4 August 4th 05 05:40 PM
How to detect current active sheet number Mike Chen Excel Programming 3 April 3rd 04 04:41 PM


All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"