Stuart_C Posted May 4, 2011 Posted May 4, 2011 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.
andy_b Posted May 4, 2011 Posted May 4, 2011 This might help: DisplayAlerts Property [Excel 2003 VBA Language Reference] 1
Stuart_C Posted May 4, 2011 Author Posted May 4, 2011 That seems to have done the trick. Cheers very much
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now