ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problems creating a chart with VBA (https://www.excelbanter.com/excel-programming/302932-problems-creating-chart-vba.html)

NooK[_18_]

Problems creating a chart with VBA
 
Hi, I have been having a problem creating graphs on VBA.

I am trying to create a XYScatter graph using some data from columns
and H in a sheet (G being X data and H being Y data).

Now If I create manually on Excel and record the macro everything work
fine but when trying to run the macro (Cleaned or uncleaned) it give
me a completelly different graph.

I could not solve the problem and I found out that I change the Exce
default chart type to xlXYScatter than everything works fine otherwis
I get a weird graph, so I was wondering if anyone knows what could b
wrong?

Worst case I can just change the default chart type to xlXYScatter bu
it would be nice to set back to what it was in the end, but I can'
find out any way to get the current default chart type so I can set i
back in the end, is there any way to do so?

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com


Jon Peltier[_7_]

Problems creating a chart with VBA
 
You didn't post the code that's not working. No attachments, just paste
it into your message.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

NooK < wrote:

Hi, I have been having a problem creating graphs on VBA.

I am trying to create a XYScatter graph using some data from columns G
and H in a sheet (G being X data and H being Y data).

Now If I create manually on Excel and record the macro everything works
fine but when trying to run the macro (Cleaned or uncleaned) it gives
me a completelly different graph.

I could not solve the problem and I found out that I change the Excel
default chart type to xlXYScatter than everything works fine otherwise
I get a weird graph, so I was wondering if anyone knows what could be
wrong?

Worst case I can just change the default chart type to xlXYScatter but
it would be nice to set back to what it was in the end, but I can't
find out any way to get the current default chart type so I can set it
back in the end, is there any way to do so?

Best Regards

NooK


---
Message posted from http://www.ExcelForum.com/




All times are GMT +1. The time now is 01:32 PM.

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