Chart help

  • Thread starter Ray Chang via AdminLife
  • Start date
R

Ray Chang via AdminLife

Hello all. I need some help. I am currently writing a macro forexcel. 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 theway) and I can manipulate it, but then thats where the problemsstart. What happens is that it opens the text file in anotherworkbook (which is good), manipulates the data, selects the dataI need to make a chart, but then creates a chart in the oldworkbook, the one containing the macro program. THen it triesto access the data, but because it is in the other workbook itcannot, and the macro crashes. I guess my question is, is therecode so that I can open/add a chart to the NEW workbook with thetext file in it?
 
T

Tom Ogilvy

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

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?
 
Top