Results 1 to 3 of 3

Edit checking before running macro (with message box)

Threaded View

yunesm Edit checking before running... 01-22-2010, 07:57 AM
blane245 Re: Edit checking before... 01-22-2010, 08:48 AM
yunesm Re: Edit checking before... 01-22-2010, 09:31 AM
  1. #1
    Forum Contributor
    Join Date
    10-28-2009
    Location
    Portland, Maine
    MS-Off Ver
    Excel 2003
    Posts
    102

    Edit checking before running macro (with message box)

    I'm trying to control the number of ways people can mess-up this worksheet.

    I have several buttons that copy one object from a worksheet "FISH PARTS" and paste them onto another "THE JUMPER FISHBONE"

    My question is can I prevent people from copying objects from the first worksheet if they already exist on the second?

    Specific to the code below: how do I make sure "BONE_1" doesn't already exist on the worksheet "THE JUMPER FISHBONE" before allowing it to be copied from the other worksheet. And can I generate a message box that tells the user the object already exists on the page.

    Sub RESTORE_BONE_1()
    Sheets("FISH PARTS").Select
        ActiveSheet.Shapes("BONE_1").Select
            Selection.Copy
                Sheets("THE JUMPER FISHBONE").Select
                    Range("B3").Select
                        ActiveSheet.Paste
    End Sub
    I hope this makes sense. My worksheet is attached. Any thoughts would be very much appreciated!
    Thanks!
    Attached Files Attached Files
    Last edited by yunesm; 01-22-2010 at 09:31 AM. Reason: Solved

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