Results 1 to 4 of 4

Macro to delete row within a specified range or disallow if out of range

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-19-2010
    Location
    UK.
    MS-Off Ver
    Excel 2007
    Posts
    142

    Smile Macro to delete row within a specified range or disallow if out of range

    I’m trying to write a macro that deletes the row of the active cell but if the selected cell is out of a specified range a message is displayed.
    Any help is appreciated, the code I have so far is below.

    If ActiveCell.Range("A13, C12") Then
    ActiveCell.EntireRow.Delete
    Else
    MsgBox "You must select a cell within the range A13 to C12"
    End If
    Last edited by Mayweed; 04-07-2011 at 01:51 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1