Trying to find Excel VBA code for "round dot" gridline.
-
Excel VBA question: help me insert a "round dot" gridline in my chart. The following line of code inserts a dotted gridline in my chart: ActiveChart.Axes(xlValue).MajorGridlines.Border.LineStyle = xlDot But if you change the gridline manually, you have two dotted line options: a faint "round dot" line and a more prominent "square dot" line. The "xlDot" choice in the code above returns the "square dot" style. I want the round dot, but none of the http://msdn.microsoft.com/en-us/library/bb241348.aspx correspond with the round dot style. How do I get that line style?
-
Answer:
Courtest of that list, the answer seems to be: ActiveChart.Axes(xlValue).MajorGridlines.Format.Line.DashStyle = msoLineSysDot
mullacc at Ask.Metafilter.Com Visit the source
Other answers
The linestyle options are just labels for integers, right? Once you've manually set the style you want, I'd try: MsgBox (ActiveChart.Axes(xlValue).MajorGridlines.Border.LineStyle) to find out the value, and then set it straight to the integer, rather than the label.
pompomtom
Strangely, it returns "-4118" which is the integer for xlDot (otherwise known as the "square dot" line).
mullacc
What version of excel are you using? (guessing 2003, which I don't have handy...) I don't suppose you want to send me an example? I'm intrigued. I suspect perhaps there's another property to the border which wants setting, but the (xl2007) test workbook I have here isn't really helping.
pompomtom
I am using Excel 2007. I uploaded the example file to http://www.divshare.com/download/11097818-786.
mullacc
Ouch. I'm stumped. I've forwarded this to an excel list I recommend (see: peach.ease.lsoft.com). Perhaps the experts there can tell us...
pompomtom
Cool. Thanks.
mullacc
Winner winner.
mullacc
Related Q & A:
- How to find the embed code for videos on a Website when it doesn't show in the source code?Best solution by Stack Overflow
- Does the Linux Professional Institute Certification (LPIC) program have an advantage in trying to find a job?Best solution by Yahoo! Answers
- Trying to find info on a email address?Best solution by Yahoo! Answers
- Trying to find a smaller printer.Best solution by Yahoo! Answers
- Trying to find life size HOT DOG STATUE?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.