Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Two completely unrelated workbood. Why is it asking me about updating links?

3 views
Skip to first unread message

Frank

unread,
Jan 27, 2010, 4:55:04 PM1/27/10
to
I have a workbook, one sheet, one named range: “dist_date”

Here is my code for the simplest of graph

Set Cht_dist555 = Charts.Add

With Cht_dist555
.ChartType = xlColumnStacked
.SetSourceData Source:=Range("dist_data"), PlotBy:=xlColumns
.Deselect
End With

When I save and reopen, it asks me about updating links. I delete the
chart, save and reopen: the update link message is gone.

I made no reference in my workbook whatsoever about the other workbook
including in the VBA reference.

So I changed the updatelinks to xlupdatelinksnever under the
"thisworkbook" property and it works.

What really bugs me is not understanding how this stupid little code
to create a chart links to another workbook.

Thoughts?

marcus

unread,
Jan 27, 2010, 6:49:32 PM1/27/10
to
Hi Frank

Just looking at your post, you have one named range called "dist_date"
but your code refers to a range called "dist_data". As these two
names vary you are asking alot of Excel. I would suggest you have a
named range in another workbooked called "dist_data".

If you mean the referenced area to be "dist_date" then change the
reference in your code and it will work ok.

Take care

Marcus

Frank

unread,
Jan 27, 2010, 7:48:06 PM1/27/10
to

Hi Marcus. My named range is “dist_data”.

Typo on my part.

marcus

unread,
Jan 27, 2010, 9:02:00 PM1/27/10
to
Hi Frank

I just put your code into a blank and new workbook and ran it on some
dummy data. It worked well and saved OK. There were no links.

Open a blank workbook put some months and random numbers in adjacent
columns, name the range "Test" then run your attached code on it.
Save the file then reopen it. If it opens without the Links message
then you need to go back and look at both your code and named range.

Good luck

Marcus

Sub MakeChart()

Set Cht_dist555 = Charts.Add

With Cht_dist555
.ChartType = xlColumnStacked

.SetSourceData Source:=Range("Test"), PlotBy:=xlColumns
.Deselect
End With

End Sub

0 new messages