+ Reply to Thread
Results 1 to 5 of 5

Paste Special, replace contents of destination

Hybrid View

Cookstein2 Paste Special, replace... 10-07-2009, 12:02 PM
royUK Re: Paste Special, replace... 10-07-2009, 12:17 PM
Cookstein2 Re: Paste Special, replace... 10-08-2009, 04:27 AM
royUK Re: Paste Special, replace... 10-08-2009, 04:34 AM
Cookstein2 Re: Paste Special, replace... 10-08-2009, 04:35 AM
  1. #1
    Registered User
    Join Date
    09-22-2009
    Location
    Cornwall, England
    MS-Off Ver
    Excel 2010 (Work) O365Home (Home)
    Posts
    94

    Paste Special, replace contents of destination

    Hi

    I am writting code that copys a range and then pastes the values back over the same range, which gets rid of the functions in the cells. I am doing this for multiple sheets.

    When the code pastes the copied selection back over the same range the code is interrupted by a message box that asks me wether I want to replace the contents of the destination cells or not. I do, how do I get my code to answer yes to this message box?

    Alex
    Last edited by Cookstein2; 10-08-2009 at 04:28 AM.

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

    Re: Paste Special, replace contents of destination

    Try adding
    Application.DisplayAlerts=False
    'your code
    Application.DispalAlerts=True
    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
    09-22-2009
    Location
    Cornwall, England
    MS-Off Ver
    Excel 2010 (Work) O365Home (Home)
    Posts
    94

    Re: Paste Special, replace contents of destination

    Thanks Roy,

    Worked a treat

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

    Re: Paste Special, replace contents of destination

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  5. #5
    Registered User
    Join Date
    09-22-2009
    Location
    Cornwall, England
    MS-Off Ver
    Excel 2010 (Work) O365Home (Home)
    Posts
    94

    Re: Paste Special, replace contents of destination

    Wow you replied quick, it was marked solved about 20 seconds after I posted my thanks

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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