+ Reply to Thread
Results 1 to 3 of 3

Macro Error Detection

  1. #1
    Registered User
    Join Date
    12-15-2005
    Posts
    42

    Macro Error Detection

    Hello!
    I have an existing macro that copies a range of data to another worksheet. I have an error code to determine if the destination worksheet exists.
    I also want to make sure that the destination range is empty before I copy to it. If the range is not empty I want to display a message box stating this fact and exit the macro.
    Note: cell P13 contains a number that determines which worksheet to copy the range to. For example: if P13=2 the range is copied to worksheet "Week2" - Range ("A5").
    This is my existing macro:
    Thanks for your help!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Something like this

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    12-15-2005
    Posts
    42

    Smile Yes!

    This worked great!
    Thanks so much!

+ Reply to Thread

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