Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code that allows the user the option of creating a copy
of the active worksheet and then names the copied worksheet: Private Sub cmdCopy_Click() Dim sh As Worksheet With ThisWorkbook ' or ActiveWorkbook Set sh = .Worksheets.Add(After:= _ .Worksheets(.Worksheets.Count)) .Worksheets("Populate Scorecard....").Cells.Copy _ Destination:=sh.Cells End With sh.Name = Range("b2").Value Issue: I would like to create some sort of error handling that if the user is trying to copy a worksheet that was previously copied/named, abort the copying process and return the user to another worksheet via GoTo. Can anyone help? Any and All Assistance Will Be Appreciated - Thanks In Advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Duplicate Range Names by worksheet | Excel Discussion (Misc queries) | |||
Finding/removing duplicate names in a worksheet | Excel Worksheet Functions | |||
Duplicate names on copied worksheet | Links and Linking in Excel | |||
Error Handling - On Error GoTo doesn't trap error successfully | Excel Programming | |||
Error handling with a handling routine | Excel Programming |