+ Reply to Thread
Results 1 to 6 of 6

deletes the selected cell with macro

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    deletes the selected cell with macro

    Hello,
    in the example I attached a colorful range E5:AI46 not blocked.
    I ask help to create a macro attached to a button that deletes only the cells of yellow range.
    If you try to cancel outside of this range a notice should say "you can not eliminate this cells".
    I hope that was understandable.
    max_max

    elimina cella.xls

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: deletes the selected cell with macro

    Right Click on the sheet name at the bottom of excel and select view code

    Paste this code there

    close visual basic.

    Double Click on any cell in the yellow range to clear it.

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: deletes the selected cell with macro

    Thanks Mehmetcik.
    Is possible to insert the notice (msgbox) as I wrote in the first tread?
    max_max

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: deletes the selected cell with macro

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: deletes the selected cell with macro

    Thanks Mehmetcik.
    It's perfect!
    Greetings from Italy.
    max_max

  6. #6
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: deletes the selected cell with macro

    Hello Mehmetcik.
    The macro works can be a change?
    After the warning:

    MsgBox "you can not eliminate this cells", vbOKOnly, "Error"

    the alert appears to excel as the picture attached.
    you can not view the notice of excel?
    Thanks again for everything.
    max-max

    excel.jpg

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 12-08-2014, 12:14 AM
  2. Replies: 2
    Last Post: 08-20-2013, 07:52 AM
  3. [SOLVED] "Delete Selected" in Search Result listbox deletes first row, instead of selected row.
    By Faustus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2013, 02:11 AM
  4. [SOLVED] Macro that deletes row if first cell (A1, A2, A3 etc) is not a number?
    By Stildawn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-03-2012, 07:28 PM
  5. [SOLVED] A macro that deletes everything in a cell until it reaches the space
    By Excelmanineedhelp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-27-2012, 09:13 AM
  6. Macro that deletes every third row....+
    By ajjag in forum Excel General
    Replies: 4
    Last Post: 06-27-2006, 01:03 PM
  7. Macro to take selected cells times a selected cell
    By Craig in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-23-2005, 08:05 PM

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