LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Position of selected rows

I want to write a code that allows users of my spreadsheet to select multiple
rows and delete them. However, i need to check first that the selected rows
are located within a certain range, that is between row 12 and row 50. If the
selection is outside that range, then the user will get a message saying they
can't delete this selection.
How do you say the following in VBA?

If the current selection is located between row 12 and row 50 then
delete selection.
Else
msgbox "sorry, you can't delete."

Many thanks
Tendresse
 
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
Adding rows based on no of rows specified from a given position nanette Excel Worksheet Functions 1 July 9th 08 02:29 PM
Position selected cell nobbyknownowt Setting up and Configuration of Excel 2 February 1st 07 08:00 AM
Default cursor/selected cell position after protecting Stilla Excel Worksheet Functions 0 December 8th 05 02:28 PM
How to I return the position of a selected cell in a range? [email protected] Excel Programming 4 November 16th 05 02:32 PM
Returning Position Points from the currently selected cell Keys1970 Excel Programming 2 December 30th 04 07:11 PM


All times are GMT +1. The time now is 05:31 PM.

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"