ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Chart help (https://www.excelbanter.com/excel-programming/302610-chart-help.html)

Ray Chang via AdminLife

Chart help
 
Hello all. I need some help. I am currently writing a macro for excel. In it, I need to browse for a text file, open it, manipulate the data a bit, and then turn it into a chart. Now, I found the code to browse for the text file (thanks, by the way) and I can manipulate it, but then thats where the problems start. What happens is that it opens the text file in another workbook (which is good), manipulates the data, selects the data I need to make a chart, but then creates a chart in the old workbook, the one containing the macro program. THen it tries to access the data, but because it is in the other workbook it cannot, and the macro crashes. I guess my question is, is there code so that I can open/add a chart to the NEW workbook with the text file in it?

--------------------------------
From: Ray Chang

-----------------------
Posted by a user from AdminLife (http://www.adminlife.com/)

<IdJeI3KAxxYUy6kzQdo/6cZw==</Id

Tom Ogilvy

Chart help
 
If your code does all that already, but just puts the chart in the wrong
workbook, the obvious answer is to modify the code to put it in the correct
workbook.

Regards,
Tom Ogilvy

"Ray Chang via AdminLife" wrote in message
...
Hello all. I need some help. I am currently writing a macro for excel. In
it, I need to browse for a text file, open it, manipulate the data a bit,
and then turn it into a chart. Now, I found the code to browse for the text
file (thanks, by the way) and I can manipulate it, but then thats where the
problems start. What happens is that it opens the text file in another
workbook (which is good), manipulates the data, selects the data I need to
make a chart, but then creates a chart in the old workbook, the one
containing the macro program. THen it tries to access the data, but because
it is in the other workbook it cannot, and the macro crashes. I guess my
question is, is there code so that I can open/add a chart to the NEW
workbook with the text file in it?

--------------------------------
From: Ray Chang

-----------------------
Posted by a user from AdminLife (http://www.adminlife.com/)

<IdJeI3KAxxYUy6kzQdo/6cZw==</Id




All times are GMT +1. The time now is 09:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com