ThomasLafferty
Instructor
When I attempt to make a copy of a worksheet in my by holding the Ctrl key and dragging and dropping on the sheet tab, I receive a Name Conflict error message. The same error occurs if I try to use VBA to make a copy of the offending sheet in the workbook. Here's the strange part: I have searched both visually with the formulas showing and hidden as well as by using Edit find and looked at formulas, values and comments of every sheet in my book. I have looked at the insert name dialog for every sheet, and I have looked at every line of code using edit find. I can find no reference to the supposed name in any way. Where else should I look? Also, if I click yes to the error, I can probably use the sheet just fine. But here's the catch: I can't suppress the error with my trap, and I will need to otherwise I will see it 90 plus times as it's part of a loop. I need either to find the name and deal with it, or find a way to suppress the error. Here's my code:
Here's a link to a screenshot of the error message, if that helps...
Help would be appreciated.![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
Tom
Live once die twice; live twice die once.
Code:
Public Sub MoveData()
' Moves data to reporting sheets based on unique manifests
'
'VARIABLE DECLARATIONS
Dim Target As Range, FilterIterations As Integer, SheetsToInsert As Integer
On Error GoTo Err_MoveData
'Create worksheets copies to receive data
For SheetsToInsert = 0 To FilterIterations - 1
[!]'Error occurs here[/!]
Sheets("TRL").Copy After:=Sheets(4)
Next SheetsToInsert
Exit_MoveData:
Exit Sub
Err_MoveData:
Err = 0
Resume Exit_MoveData
End Sub
Here's a link to a screenshot of the error message, if that helps...
Help would be appreciated.
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
Tom
Live once die twice; live twice die once.