By Pass Message Box
Posted by Stanley on November 16, 2001 12:11 PM
The following macro to pull two columns of data/formulas from one worksheet and insert into another works fine except that it creates a message box saying: "A formula you want to move or copy contains the name 'AuditList', which already exists on the destination sheet. Do you want to use this version of the name? (more text but I think this describes it).
I'm sure the answer will always be "Yes". Is there VBA code I can add to answer yes and/or bypass this message?
Thanks, Stanley
ActiveSheet.Unprotect
Selection.EntireColumn.Insert
Selection.EntireColumn.Insert
Sheets("Ranges").Select
Columns("K:L").Select
Selection.Copy
Sheets("Spreadsheet (2)").Select
Columns(ActiveCell.Column).Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False _
, Transpose:=False
Range("b2").Select
Sheets("Ranges").Select
Application.CutCopyMode = False
Range("D1").Select
Sheets("Spreadsheet (2)").Select
ActiveSheet.Protect