PC Review


Reply
Thread Tools Rate Thread

How to avoid name conflicts while copying sheets

 
 
jaffar
Guest
Posts: n/a
 
      30th May 2006
hi,

Hi
i'm writing macros for an excel file.

i've a macro which will read the data from there are 30 to 40 work books
each work book contains 8 worksheets and copies that data
and paste the copied data into new workbook with corresponding 8 sheets.

it is copying the data into new work sheet. whats my problem is while coping
the data from all work books data it gives an dailog box.it gives an error
it shows the message as. i used same name in all 30-40 workbooks
_DATA_impact_image

"A formula or sheet you want to move or copy contains the name
'_DATA_impact_image', which already exists on the destination worksheet.Do
you want to use this version of the name?

..TO use name as defined in the destination sheet, click yes.
..To rename the range referred in the formula or worksheet,click no, and
enter a new name in the name Conflict dialog box."


How can i avoid this while gathering the data from the workbooks.

can anyone tell me how to do this.
its very urgent for me

thanx in advance
jaffar


 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      30th May 2006
jaffar,

Try using

Application.DisplayAlerts = False

at the top of your code, and

Application.DisplayAlerts = True

at the bottom. Excel should then default to using the local name with the formula.

HTH,
Bernie
MS Excel MVP


"jaffar" <(E-Mail Removed)> wrote in message
news:OH7waY%(E-Mail Removed)...
> hi,
>
> Hi
> i'm writing macros for an excel file.
>
> i've a macro which will read the data from there are 30 to 40 work books each work book contains
> 8 worksheets and copies that data
> and paste the copied data into new workbook with corresponding 8 sheets.
>
> it is copying the data into new work sheet. whats my problem is while coping the data from all
> work books data it gives an dailog box.it gives an error it shows the message as. i used same name
> in all 30-40 workbooks _DATA_impact_image
>
> "A formula or sheet you want to move or copy contains the name '_DATA_impact_image', which already
> exists on the destination worksheet.Do you want to use this version of the name?
>
> .TO use name as defined in the destination sheet, click yes.
> .To rename the range referred in the formula or worksheet,click no, and enter a new name in the
> name Conflict dialog box."
>
>
> How can i avoid this while gathering the data from the workbooks.
>
> can anyone tell me how to do this.
> its very urgent for me
>
> thanx in advance
> jaffar
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up resources to avoid booking conflicts Newbie Microsoft Outlook Calendar 0 16th Jan 2008 08:47 PM
How to avoid name conflicts while copying sheets jaffar Microsoft Excel Programming 1 30th May 2006 01:45 PM
Debuggin and Shadow Copying. How to avoid copying dll in temp fold =?Utf-8?B?TWljaGFlbCBOZW10c2V2?= Microsoft C# .NET 4 1st Mar 2006 08:55 AM
Reinstalling OS, drivers, apps - best sequence to avoid conflicts? David Winter Windows XP Basics 3 9th May 2004 04:10 PM
Merging sheets -- name range conflicts mdesandoli Microsoft Excel Misc 4 27th Sep 2003 03:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:38 PM.