-
WSrrdavis
AskWoody LoungerThanks for the suggestion, Wendell. However, TransferSpreadsheet won’t work for me since the data is starting in Access. It is pulled into Excel (or sent there) supplying data for an already formated chart, then pulled back into Access. If I Export it, a new spreadsheet (or even file) will be created and the chart won’t exist. I don’t see a way to tell Access to overwrite an existing range. Is there a way to do this?
I have no experience creating an Excel chart from automation. If there is no easier way, I can look into this.
-
WSrrdavis
AskWoody LoungerThanks for the suggestion, Wendell. However, TransferSpreadsheet won’t work for me since the data is starting in Access. It is pulled into Excel (or sent there) supplying data for an already formated chart, then pulled back into Access. If I Export it, a new spreadsheet (or even file) will be created and the chart won’t exist. I don’t see a way to tell Access to overwrite an existing range. Is there a way to do this?
I have no experience creating an Excel chart from automation. If there is no easier way, I can look into this.
-
WSrrdavis
AskWoody Lounger390 characters including the criteria string. Criteria string is 84 characters long. I realize that there is a limit to how long the SQL string can be, but surely I’m not close. I know (or at least I think I know) that I’ve had other queries with longer SQL strings.
-
WSrrdavis
AskWoody Lounger390 characters including the criteria string. Criteria string is 84 characters long. I realize that there is a limit to how long the SQL string can be, but surely I’m not close. I know (or at least I think I know) that I’ve had other queries with longer SQL strings.
-
WSrrdavis
AskWoody LoungerI agree! One thing to look out for: During a previous project, I tried to use Word as a report writer, which OLE’d a chart from Excel, which in turned pulled it’s data from Access, which in turn pulled it’s data from an AS/400. Quite a data path. The solution included some code within Word to force Excel to update it’s data from Access. It worked, except it would partially corrupt the Excel file. By partially, I mean that the solution would produce the intended results, but the Excel file could no longer be opened and therefore it could not be edited if something changed or needed to be added. If you tried to open the Excel file, nothing would happen–No error message or anything. I finally abandoned that solution.
-
WSrrdavis
AskWoody LoungerI agree! One thing to look out for: During a previous project, I tried to use Word as a report writer, which OLE’d a chart from Excel, which in turned pulled it’s data from Access, which in turn pulled it’s data from an AS/400. Quite a data path. The solution included some code within Word to force Excel to update it’s data from Access. It worked, except it would partially corrupt the Excel file. By partially, I mean that the solution would produce the intended results, but the Excel file could no longer be opened and therefore it could not be edited if something changed or needed to be added. If you tried to open the Excel file, nothing would happen–No error message or anything. I finally abandoned that solution.
-
WSrrdavis
AskWoody LoungerThanks Steve and Hans for your input.
Hans, it appears that MSChart expects data with series in columns. My data is coming in with series in rows. I couldn’t figure out how to MSChart to read it the other way. If anyone knows how to do this, I would love to hear it. I can’t change the orientation of the data because Access is reading directly from our AS/400. That is my problem with MSChart.
Your idea regarding Past Special… did the trick, though. That comment prompted me to pull the data into Excel, create a chart, then Paste Special it back into Access. I just got through with this when Steve’s post came across with the exact same solution I just used. Steve–it worked like a charm! There is even a parameter in the base query that I thought I would have to use code to get Excel to update the data as the parameter changes, but it gets propagated automatically. Way cool.
-
WSrrdavis
AskWoody LoungerThanks Steve and Hans for your input.
Hans, it appears that MSChart expects data with series in columns. My data is coming in with series in rows. I couldn’t figure out how to MSChart to read it the other way. If anyone knows how to do this, I would love to hear it. I can’t change the orientation of the data because Access is reading directly from our AS/400. That is my problem with MSChart.
Your idea regarding Past Special… did the trick, though. That comment prompted me to pull the data into Excel, create a chart, then Paste Special it back into Access. I just got through with this when Steve’s post came across with the exact same solution I just used. Steve–it worked like a charm! There is even a parameter in the base query that I thought I would have to use code to get Excel to update the data as the parameter changes, but it gets propagated automatically. Way cool.
-
WSrrdavis
AskWoody LoungerInteresting discussion. I think I got some direction to go. Thanks
-
WSrrdavis
AskWoody LoungerInteresting discussion. I think I got some direction to go. Thanks
-
WSrrdavis
AskWoody LoungerI have created a Word document with a linked Excel chart. There is code that updates the data for the chart automatically. After I run this code within Word, the excel file that contained the data and the chart is no longer accessible. I cannot open it for further editing. Interestingly, though, running the apparently offending macro in Word still accesses the Excel chart and updates the data like it is suppose to. How weird is that?? Is there something else I should have done in order to release that file?
Here is the code I ended up with:
[indent]
Private Sub Document_Open()
Dim wbk As Object
Set wbk = GetObject(“C:test1.xls”)
With wbk
.Sheets(“sheet1”).Range(“A2”).QueryTable.Refresh
.Sheets(“chart1”).Select
.Close (True)
End WithSet wbk = Nothing
End Sub
[/indent]
-
WSrrdavis
AskWoody LoungerSteve–
It seems that I had macro security set to high so the macro would not run. Interesting that I did not get a warning, however. Thanks for your help, your code was useful in helping me to debug mine. Now I get to read up on how to sign a macro. It works like a charm now, except for the security setting.
-
WSrrdavis
AskWoody LoungerSteve–
It seems that I had macro security set to high so the macro would not run. Interesting that I did not get a warning, however. Thanks for your help, your code was useful in helping me to debug mine. Now I get to read up on how to sign a macro. It works like a charm now, except for the security setting.
-
WSrrdavis
AskWoody LoungerThanks again Steve. However, I don’t think the Document_Open procedure is firing. I tested this by clearing the procedure and just adding a Msgbox, which did not appear with the opening of the document. Am I right — that this procedure is suppose to fire upon opening the document? Is there something else that I need to do?
-
WSrrdavis
AskWoody LoungerThanks again Steve. However, I don’t think the Document_Open procedure is firing. I tested this by clearing the procedure and just adding a Msgbox, which did not appear with the opening of the document. Am I right — that this procedure is suppose to fire upon opening the document? Is there something else that I need to do?
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Reviewing your licensing options
by
Susan Bradley
2 hours, 22 minutes ago -
Apple has been analyzing your photos since September 2024
by
B. Livingston
34 minutes ago -
What Windows 11 24H2 offers beyond bugs
by
Lance Whitney
18 minutes ago -
Making sense of Settings in Windows 11
by
Simon Bisson
5 hours, 22 minutes ago -
Windows 11 pro fails to log in after upgrading Win 10 pro to Win 11 pro 24h2
by
ben_sitaud
7 hours, 1 minute ago -
23H2 / 24H2 / Local v. Microsoft Account.
by
CWBillow
9 hours, 57 minutes ago -
YouTube Ad Blocker Blocker
by
bbearren
1 hour, 31 minutes ago -
Obscure historical facts about Windows
by
Cybertooth
13 hours, 59 minutes ago -
Microsoft Backup
by
Linda2019
6 hours, 42 minutes ago -
What is the best notepad++ version for W7?
by
Picky
16 hours, 52 minutes ago -
What are right steps to move MS 365 Office+OneDrive files from PC to iMac?
by
glnz
23 hours, 52 minutes ago -
How to move existing MS 365 Office with OneDrive files from PC to new iMac
by
glnz
23 hours, 54 minutes ago -
How to move MS 365 files (some on OneDrive) from PC to iMac
by
glnz
1 day, 18 hours ago -
Microsoft adding Quick Machine Recovery to Windows 11
by
Alex5723
1 day, 19 hours ago -
Microsoft vs Passwords
by
Alex5723
1 day, 3 hours ago -
Windows 11 Insider Preview build 26200.5516 released to DEV
by
joep517
1 day, 22 hours ago -
Windows 11 Insider Preview build 26120.3653 (24H2) released to BETA
by
joep517
1 day, 22 hours ago -
Two March KB5053606 updates?
by
Adam
1 day, 16 hours ago -
MS Edge Not Updating to v134.0.3124.95 (rel. 27-Mar-2025)
by
lmacri
1 day, 16 hours ago -
Intel® Graphics/Sound Driver updates for 7th-10th Gen Intel® Core™ Processor
by
Alex5723
1 day, 19 hours ago -
Is there a comprehensve way to tranfer ALL current Edge Settings into a new Edge
by
Tex265
1 day, 18 hours ago -
Transferring ALL info/settings from current Firefox to new computer Firefox
by
Tex265
1 day, 17 hours ago -
DOGE Wants to Replace SSA 60 Million Line COBOL Codebase in Months
by
EyesOnWindows
3 minutes ago -
KB5051989 Usb printer Post Ipp
by
licencesti
2 days, 11 hours ago -
Removing bypassnro
by
Susan Bradley
9 hours, 58 minutes ago -
Up to 30 seconds to show “Recent Topics”
by
PL1
1 day, 15 hours ago -
Sound changes after upgrade from W11 23H2
by
WStaylorpsepa
16 hours, 21 minutes ago -
Windows bug blocks BIOS updates for Lenovo ThinkPad laptops
by
Alex5723
2 days, 20 hours ago -
O&O Software – ‘World Backup Day’ Sale
by
unbob
2 days, 16 hours ago -
Still version 23H2?
by
WSbxcfilm
2 days, 20 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.