Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excell copy action pauses for 15 second for the smallest action Meekal Excel Discussion (Misc queries) 1 January 28th 10 04:30 PM
Excel 2002 SP3 Copy Worksheet with another sheet named range now # Brewmanz Excel Discussion (Misc queries) 0 October 1st 09 12:35 AM
Copy data and paste to different sheet named on Group Prem Excel Discussion (Misc queries) 1 February 21st 08 02:56 PM
Planilha action control Renato New Users to Excel 0 December 8th 07 06:34 PM
Copy Sheet action very slow RobN[_3_] Excel Discussion (Misc queries) 0 June 27th 07 03:32 AM


All times are GMT +1. The time now is 07:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"