+ Post New Thread
Results 1 to 3 of 3
Coding Thread, Excel VBA Issues suppress propmt in Coding and Web Development; Hi there, The following is a snipet of some code I am trying to get to work. Code: Range("A2:K40").Select Selection.Copy ...
  1. #1

    Join Date
    Nov 2007
    Location
    Rotherham
    Posts
    1,675
    Thank Post
    122
    Thanked 126 Times in 102 Posts
    Rep Power
    45

    Excel VBA Issues suppress propmt

    Hi there,
    The following is a snipet of some code I am trying to get to work.

    Code:
        Range("A2:K40").Select
        Selection.Copy
        Workbooks.Open Filename:="T:\Training_Materials\SIMSRep\DET_FullList.xlsx"
        Range("A2:F40").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Application.CutCopyMode = False
        Calculate
    The problem is that when it performs the paste I am prompted to confirm the overwriting the data in selected cells. How do I suppress this message. I've tried using "sendkeys" to send both Y and {RETURN} to OK the box automatically but neither worked (assuming I was doing it correctly).

    Can anyone help.

  2. #2

    Join Date
    Apr 2007
    Location
    Birmingham
    Posts
    142
    Thank Post
    6
    Thanked 45 Times in 39 Posts
    Rep Power
    22

  3. Thanks to andy_b from:

    Stuart_C (4th May 2011)

  4. #3

    Join Date
    Nov 2007
    Location
    Rotherham
    Posts
    1,675
    Thank Post
    122
    Thanked 126 Times in 102 Posts
    Rep Power
    45
    That seems to have done the trick. Cheers very much

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 8
    Last Post: 5th August 2010, 10:04 AM
  2. Excel VBA Issues
    By dataoverride in forum Coding
    Replies: 5
    Last Post: 23rd September 2009, 02:16 PM
  3. Excel VBA problems
    By cursong in forum Coding
    Replies: 1
    Last Post: 13th October 2008, 11:28 AM
  4. Excel VBA Loop Question
    By vunsev in forum Coding
    Replies: 5
    Last Post: 11th April 2008, 08:08 AM
  5. Cut and paste issues between excel and word
    By 17thcpikeman in forum Windows
    Replies: 1
    Last Post: 30th November 2007, 01:42 PM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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