J
John
I have the following selected piece of Code that hits debug on line
"ActiveSheet.Paste". The reason it does is that a command window comes up
saying
"Do you want to Replace the Contents of the Destination Cells" - how can I
automate this to say "Yes" within my code?
Sheets("Claim Form").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.Unprotect Password:="123"
Range("A1").Select
Cells.Select
Selection.Copy
Sheets("E-Claim").Visible = True
Sheets("E-Claim").Select
ActiveSheet.Unprotect Password:="123"
Range("A1").Select
ActiveSheet.Paste
Thanks
"ActiveSheet.Paste". The reason it does is that a command window comes up
saying
"Do you want to Replace the Contents of the Destination Cells" - how can I
automate this to say "Yes" within my code?
Sheets("Claim Form").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.Unprotect Password:="123"
Range("A1").Select
Cells.Select
Selection.Copy
Sheets("E-Claim").Visible = True
Sheets("E-Claim").Select
ActiveSheet.Unprotect Password:="123"
Range("A1").Select
ActiveSheet.Paste
Thanks