PC Review


Reply
Thread Tools Rate Thread

.addline error duplicate name

 
 
perf
Guest
Posts: n/a
 
      22nd Apr 2010
Hi,
I having a problem using .addline method in VBA code. I am using office 2007
and .xls format (for compatibility with office 2003 reasons) files:
when I draw a new line with this .addline method, I see that the sometimes
(not always, quite randomly) the name given to the new line is already
existing in the sheet. so later in the program, I have a lot of problem
grouping the blocks (excel cannot choose the right shape by name)

how is it possible that addline method does this duplication?


many thanks in advance

Mark
 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      22nd Apr 2010
Are you sure the name is in the same sheet? It will assign the same name
to a line on sheet 2 as on sheet 1 and other sheets. But I have never seen
it assign the same name to a shape on the same sheet. Look for Sheet1!Line1
and Sheet2!Line1 for names. The sheet name should differentiate between the
line names.



"perf" <(E-Mail Removed)> wrote in message
news:43A0F3A8-96AC-4E7C-908A-(E-Mail Removed)...
> Hi,
> I having a problem using .addline method in VBA code. I am using office
> 2007
> and .xls format (for compatibility with office 2003 reasons) files:
> when I draw a new line with this .addline method, I see that the sometimes
> (not always, quite randomly) the name given to the new line is already
> existing in the sheet. so later in the program, I have a lot of problem
> grouping the blocks (excel cannot choose the right shape by name)
>
> how is it possible that addline method does this duplication?
>
>
> many thanks in advance
>
> Mark



 
Reply With Quote
 
perf
Guest
Posts: n/a
 
      22nd Apr 2010
I also thought it was impossible, but I have just tried to create one group
of shapes and the code crashed.

I can see why: there are exactly two "Straight Connector 295" on the same
sheet, one just created and one grouped in another block previously created.
in a way like this, the code crashed.
is there any way to decide the number of the lines?

how can it be possible? i suppose it's related to the way office 2007 maages
..xls files...

any suggestion/idea?

thanks

mark

thanks



"JLGWhiz" wrote:

> Are you sure the name is in the same sheet? It will assign the same name
> to a line on sheet 2 as on sheet 1 and other sheets. But I have never seen
> it assign the same name to a shape on the same sheet. Look for Sheet1!Line1
> and Sheet2!Line1 for names. The sheet name should differentiate between the
> line names.
>
>
>
> "perf" <(E-Mail Removed)> wrote in message
> news:43A0F3A8-96AC-4E7C-908A-(E-Mail Removed)...
> > Hi,
> > I having a problem using .addline method in VBA code. I am using office
> > 2007
> > and .xls format (for compatibility with office 2003 reasons) files:
> > when I draw a new line with this .addline method, I see that the sometimes
> > (not always, quite randomly) the name given to the new line is already
> > existing in the sheet. so later in the program, I have a lot of problem
> > grouping the blocks (excel cannot choose the right shape by name)
> >
> > how is it possible that addline method does this duplication?
> >
> >
> > many thanks in advance
> >
> > Mark

>
>
> .
>

 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      23rd Apr 2010
I have not dealt with xl2007 + yet, so I am not familiar with its
idiosyncrasies. I also was not aware the shapes which had been grouped
could contain the same names as shapes that were not grouped. But there is
a lot about this monster that I don't know.


"perf" <(E-Mail Removed)> wrote in message
news:E8B1A002-E02C-4C08-8548-(E-Mail Removed)...
>I also thought it was impossible, but I have just tried to create one group
> of shapes and the code crashed.
>
> I can see why: there are exactly two "Straight Connector 295" on the same
> sheet, one just created and one grouped in another block previously
> created.
> in a way like this, the code crashed.
> is there any way to decide the number of the lines?
>
> how can it be possible? i suppose it's related to the way office 2007
> maages
> .xls files...
>
> any suggestion/idea?
>
> thanks
>
> mark
>
> thanks
>
>
>
> "JLGWhiz" wrote:
>
>> Are you sure the name is in the same sheet? It will assign the same
>> name
>> to a line on sheet 2 as on sheet 1 and other sheets. But I have never
>> seen
>> it assign the same name to a shape on the same sheet. Look for
>> Sheet1!Line1
>> and Sheet2!Line1 for names. The sheet name should differentiate between
>> the
>> line names.
>>
>>
>>
>> "perf" <(E-Mail Removed)> wrote in message
>> news:43A0F3A8-96AC-4E7C-908A-(E-Mail Removed)...
>> > Hi,
>> > I having a problem using .addline method in VBA code. I am using office
>> > 2007
>> > and .xls format (for compatibility with office 2003 reasons) files:
>> > when I draw a new line with this .addline method, I see that the
>> > sometimes
>> > (not always, quite randomly) the name given to the new line is already
>> > existing in the sheet. so later in the program, I have a lot of problem
>> > grouping the blocks (excel cannot choose the right shape by name)
>> >
>> > how is it possible that addline method does this duplication?
>> >
>> >
>> > many thanks in advance
>> >
>> > Mark

>>
>>
>> .
>>



 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      23rd Apr 2010
I am thinking that that should not be happening, and that you might have
turned up a bug. But without having that version of Excel I cannot verify
it. Maybe you should post it as a recommendation for MS to fix and see
what results you get.


"perf" <(E-Mail Removed)> wrote in message
news:E8B1A002-E02C-4C08-8548-(E-Mail Removed)...
>I also thought it was impossible, but I have just tried to create one group
> of shapes and the code crashed.
>
> I can see why: there are exactly two "Straight Connector 295" on the same
> sheet, one just created and one grouped in another block previously
> created.
> in a way like this, the code crashed.
> is there any way to decide the number of the lines?
>
> how can it be possible? i suppose it's related to the way office 2007
> maages
> .xls files...
>
> any suggestion/idea?
>
> thanks
>
> mark
>
> thanks
>
>
>
> "JLGWhiz" wrote:
>
>> Are you sure the name is in the same sheet? It will assign the same
>> name
>> to a line on sheet 2 as on sheet 1 and other sheets. But I have never
>> seen
>> it assign the same name to a shape on the same sheet. Look for
>> Sheet1!Line1
>> and Sheet2!Line1 for names. The sheet name should differentiate between
>> the
>> line names.
>>
>>
>>
>> "perf" <(E-Mail Removed)> wrote in message
>> news:43A0F3A8-96AC-4E7C-908A-(E-Mail Removed)...
>> > Hi,
>> > I having a problem using .addline method in VBA code. I am using office
>> > 2007
>> > and .xls format (for compatibility with office 2003 reasons) files:
>> > when I draw a new line with this .addline method, I see that the
>> > sometimes
>> > (not always, quite randomly) the name given to the new line is already
>> > existing in the sheet. so later in the program, I have a lot of problem
>> > grouping the blocks (excel cannot choose the right shape by name)
>> >
>> > how is it possible that addline method does this duplication?
>> >
>> >
>> > many thanks in advance
>> >
>> > Mark

>>
>>
>> .
>>



 
Reply With Quote
 
Martin Brown
Guest
Posts: n/a
 
      23rd Apr 2010
perf wrote:
> I also thought it was impossible, but I have just tried to create one group
> of shapes and the code crashed.
>
> I can see why: there are exactly two "Straight Connector 295" on the same
> sheet, one just created and one grouped in another block previously created.
> in a way like this, the code crashed.
> is there any way to decide the number of the lines?
>
> how can it be possible? i suppose it's related to the way office 2007 maages
> .xls files...
>
> any suggestion/idea?


Shapes in XL2007 are bug ridden. It doesn't surprise me at all.

Be aware that some shapes parameters are incompatible in XL2007 vs
XL2003 so that to make code work in both it harder than it sounds.

Good luck.

Regards,
Martin Brown

>
> thanks
>
> mark
>
> thanks
>
>
>
> "JLGWhiz" wrote:
>
>> Are you sure the name is in the same sheet? It will assign the same name
>> to a line on sheet 2 as on sheet 1 and other sheets. But I have never seen
>> it assign the same name to a shape on the same sheet. Look for Sheet1!Line1
>> and Sheet2!Line1 for names. The sheet name should differentiate between the
>> line names.
>>
>>
>>
>> "perf" <(E-Mail Removed)> wrote in message
>> news:43A0F3A8-96AC-4E7C-908A-(E-Mail Removed)...
>>> Hi,
>>> I having a problem using .addline method in VBA code. I am using office
>>> 2007
>>> and .xls format (for compatibility with office 2003 reasons) files:
>>> when I draw a new line with this .addline method, I see that the sometimes
>>> (not always, quite randomly) the name given to the new line is already
>>> existing in the sheet. so later in the program, I have a lot of problem
>>> grouping the blocks (excel cannot choose the right shape by name)
>>>
>>> how is it possible that addline method does this duplication?
>>>
>>>
>>> many thanks in advance
>>>
>>> Mark

>>
>> .
>>

 
Reply With Quote
 
perf
Guest
Posts: n/a
 
      24th Apr 2010
This is an answer that an user would never listen to...

I am a little disappointed with such a product. these errors are not
permissible!

so, I'll modify the name by myself in order to avoid duplication.

thanks!

mark

"Martin Brown" wrote:

> perf wrote:
> > I also thought it was impossible, but I have just tried to create one group
> > of shapes and the code crashed.
> >
> > I can see why: there are exactly two "Straight Connector 295" on the same
> > sheet, one just created and one grouped in another block previously created.
> > in a way like this, the code crashed.
> > is there any way to decide the number of the lines?
> >
> > how can it be possible? i suppose it's related to the way office 2007 maages
> > .xls files...
> >
> > any suggestion/idea?

>
> Shapes in XL2007 are bug ridden. It doesn't surprise me at all.
>
> Be aware that some shapes parameters are incompatible in XL2007 vs
> XL2003 so that to make code work in both it harder than it sounds.
>
> Good luck.
>
> Regards,
> Martin Brown
>
> >
> > thanks
> >
> > mark
> >
> > thanks
> >
> >
> >
> > "JLGWhiz" wrote:
> >
> >> Are you sure the name is in the same sheet? It will assign the same name
> >> to a line on sheet 2 as on sheet 1 and other sheets. But I have never seen
> >> it assign the same name to a shape on the same sheet. Look for Sheet1!Line1
> >> and Sheet2!Line1 for names. The sheet name should differentiate between the
> >> line names.
> >>
> >>
> >>
> >> "perf" <(E-Mail Removed)> wrote in message
> >> news:43A0F3A8-96AC-4E7C-908A-(E-Mail Removed)...
> >>> Hi,
> >>> I having a problem using .addline method in VBA code. I am using office
> >>> 2007
> >>> and .xls format (for compatibility with office 2003 reasons) files:
> >>> when I draw a new line with this .addline method, I see that the sometimes
> >>> (not always, quite randomly) the name given to the new line is already
> >>> existing in the sheet. so later in the program, I have a lot of problem
> >>> grouping the blocks (excel cannot choose the right shape by name)
> >>>
> >>> how is it possible that addline method does this duplication?
> >>>
> >>>
> >>> many thanks in advance
> >>>
> >>> Mark
> >>
> >> .
> >>

> .
>

 
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
Duplicate (?) Name Error noelma Windows XP Networking 7 10th May 2009 05:29 PM
Duplicate Error!!!!! dedblank@gmail.com Microsoft Excel Misc 2 9th Dec 2008 08:07 PM
Duplicate value error although there is no duplicate value Mike Microsoft Access 2 11th Sep 2007 07:30 PM
Duplicate Values Error/No Primary Key Error =?Utf-8?B?aHA5NTAw?= Microsoft Access Forms 5 23rd Jun 2005 01:28 AM
Error code to replace duplicate record error rick Microsoft Access Forms 1 27th Nov 2003 04:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:02 AM.