Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy of sheet contains the named 'Control'. Action required.
Hi to all
I have a macro that copies a sheet and although it was working well, one day I suddenly got the message: A formula or sheet you want to move or copy contains the name 'HTML_Control', which already exists on the destination worksheet. Do want to use this version of the name? To use the name . . . . etc If you click on 'Yes' it continues an if 'No' you can't continue although it doesn't actually 'bomb'. Although it still works, the user gets very confused each time it happens (each month). What causes it and how can I find the named 'Control' and eliminate it? I have searched for 'HTML_Control' without success. Thanks Peter Bircher |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy of sheet contains the named 'Control'. Action required.
Asked and answered . . .
I have just been on to the Microsoft support site (yes, I know I sould have looked there first but , , , ) and found this program and it worked like a charm so I will paste it as is: ' Module to remove all hidden names on active workbook Sub Remove_Hidden_Names() ' Dimension variables. Dim xName As Variant Dim Result As Variant Dim Vis As Variant ' Loop once for each name in the workbook. For Each xName In ActiveWorkbook.Names 'If a name is not visible (it is hidden)... If xName.Visible = True Then Vis = "Visible" Else Vis = "Hidden" End If ' ...ask whether or not to delete the name. Result = MsgBox(prompt:="Delete " & Vis & " Name " & _ Chr(10) & xName.Name & "?" & Chr(10) & _ "Which refers to: " & Chr(10) & xName.RefersTo, _ Buttons:=vbYesNo) ' If the result is true, then delete the name. If Result = vbYes Then xName.Delete ' Loop to the next name. Next xName End Sub "Pete" wrote in message ... Hi to all I have a macro that copies a sheet and although it was working well, one day I suddenly got the message: A formula or sheet you want to move or copy contains the name 'HTML_Control', which already exists on the destination worksheet. Do want to use this version of the name? To use the name . . . . etc If you click on 'Yes' it continues an if 'No' you can't continue although it doesn't actually 'bomb'. Although it still works, the user gets very confused each time it happens (each month). What causes it and how can I find the named 'Control' and eliminate it? I have searched for 'HTML_Control' without success. Thanks Peter Bircher |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excell copy action pauses for 15 second for the smallest action | Excel Discussion (Misc queries) | |||
Excel 2002 SP3 Copy Worksheet with another sheet named range now # | Excel Discussion (Misc queries) | |||
Copy data and paste to different sheet named on Group | Excel Discussion (Misc queries) | |||
Planilha action control | New Users to Excel | |||
Copy Sheet action very slow | Excel Discussion (Misc queries) |