Excel Graph Macro

  HauxtonPhil 18:51 11 May 05
Locked

This may not be the place to look for this sort of help - if so sorry, but I'm in a bit of a corner with a deadline looming.
I am writing a macro in Excel which opens a text file, converts it to an Excel file (in a new workbook). That all works nicely. Then I want it to plot a graph of the data in the new workbook using data from that workbook. How do I tell the VBA editor running in the first workbook to work on data and plot the graph in the second workbook.
Any help greatly appreciated.

  VoG II 21:46 13 May 05

The VBA code simply needs to reference the second workbook. Or am I missing something?

  HauxtonPhil 22:44 13 May 05

No, I don't think you are missing anything, but I am !- I cannot figure the correct syntax for addressing the second workbook and sheet on the second workbook.

  VoG II 08:13 14 May 05

Workbooks("book2.xls").Activate

This will now be "looking" at your second workbook.

Sheets("mysheet").Activate

will now be "looking" at the mysheet sheet in the second workbook.

  HauxtonPhil 10:23 14 May 05

Thank you for that VOG - it was that last missing piece that I needed!

This thread is now locked and can not be replied to.

How to get Windows 10 for free | How to install Windows 10: There is still a way to avoid paying…

1995-2015: How technology has changed the world in 20 years

Hands-on with the Star Wars fighting drones you can fly yourself

15 macOS Sierra tips | How to use macOS Sierra: Secret tricks and best new features in Apple's new…