VBA - Change Graph Axis Type to Text

litlelee9

New Member
Joined
May 4, 2016
Messages
1
Looking for the correct syntax to change the horizontal axis type from the default "Automatic" to "Text". I have a chart that points to data on various sheets within an excel workbook. The data is pulled however, the X Axis column that it points to is in a data format. The data format is "[$-409]m/d/yy h:mm:ss AM/PM;@". When the data is displayed using the default format it only shows the days and not the hours/minutes/seconds. If I change the format to Text it displays properly...the goal is to do this through a macro so when the data is updated the graph is also updated and displays properly. Thoughts? I have been looking at the VBA reference WIKI but cannot seem to get the right syntax down.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,216,477
Messages
6,130,879
Members
449,603
Latest member
dizze90

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top