Replace Cell Values Popup

helpexcel

Well-known Member
Joined
Oct 21, 2009
Messages
538
Hi I have a macro that copies data, and when it runs you get a message box asking if you want to replace cell values (this MsgBox is not in my code). How do i stop this from popping up? the answer is always going to be yes. thanks!
 

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
4,963
Office Version
365
Platform
Windows
Try

Code:
 Application.DisplayAlerts = False

[I] your code goes here[/I]

 Application.DisplayAlerts = True
 
Last edited:

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
33,860
Office Version
365
Platform
Windows
Could you please supply the code?
 

helpexcel

Well-known Member
Joined
Oct 21, 2009
Messages
538
Sorry. here's the code. I didn't copy the Sub/Updating part.
Code:
   With Sheet31    .Range("AI241:BM246").Copy
    .Range("A17:AE22").PasteSpecial xlPasteValuesAndNumberFormats
    
    .Range("BQ241:CU246").Copy
    .Range("A51:AE56").PasteSpecial xlPasteValuesAndNumberFormats
    End With
 

Forum statistics

Threads
1,085,842
Messages
5,386,292
Members
401,992
Latest member
CleverHopper

Some videos you may like

This Week's Hot Topics

Top