Jump to content

Recommended Posts

Posted

Hi there,

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

 

    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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...