Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating multiple charts from large data file smtt09 Charts and Charting in Excel 0 February 16th 09 02:19 PM
Importing Data and Creating Charts from Spreadsheet Jeff Rasnick Charts and Charting in Excel 3 April 19th 07 06:02 PM
Creating charts - first row&column treated as normal data Enzo Charts and Charting in Excel 4 July 6th 06 09:28 PM
How can you add the same data series to all charts in a workbook MBubier Charts and Charting in Excel 3 January 30th 06 02:18 PM
help in creating charts of vehicle data TM Charts and Charting in Excel 6 March 16th 05 03:44 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"