![]() |
Creating Charts Using Data from another Workbook
I am currently trying to write a VBA program that prompts the user to search for a text file. The text file is then opened in a new workbook, has its data arranged into specific columns, and then saves it as a new xls file. Then, the program is supposed to read data from several of the columns, and create a chart based on the data.
Here is the problem. It opens the file, arranges it into columns, saves it as a new workbook, highlights the columns I need to use to make the chart, but then creates a blank chart in the old workbook (the one with the macro in it) and then crashes saying that the data is out of range. How do I make it instead make a new chart in the new workbook, and use the data from the new workbook to make it into a graph (the actual creating of a graph works seperate from the rest of the program). -------------------------------- From: Ray Chang ----------------------- Posted by a user from AdminLife (http://www.adminlife.com/) <IdK9FKPqJyl06cLCLkhLQgSA==</Id |
Creating Charts Using Data from another Workbook
Just modify the existing code to do what it is doing in the correct
location. -- Regards, Tom Ogilvy "Ray Chang via AdminLife" wrote in message ... I am currently trying to write a VBA program that prompts the user to search for a text file. The text file is then opened in a new workbook, has its data arranged into specific columns, and then saves it as a new xls file. Then, the program is supposed to read data from several of the columns, and create a chart based on the data. Here is the problem. It opens the file, arranges it into columns, saves it as a new workbook, highlights the columns I need to use to make the chart, but then creates a blank chart in the old workbook (the one with the macro in it) and then crashes saying that the data is out of range. How do I make it instead make a new chart in the new workbook, and use the data from the new workbook to make it into a graph (the actual creating of a graph works seperate from the rest of the program). -------------------------------- From: Ray Chang ----------------------- Posted by a user from AdminLife (http://www.adminlife.com/) <IdK9FKPqJyl06cLCLkhLQgSA==</Id |
All times are GMT +1. The time now is 05:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com