Solved

XL97 HowTo use xlMarkerStylePicture?

Posted on 1999-01-11
1
1,126 Views
Last Modified: 2010-10-05
XL97: How do I use the constant xlMarkerStylePicture? It's a constant of the property MarkerStyle. The Help files do not have this information.
0
Comment
Question by:skb7
1 Comment
 
LVL 2

Accepted Solution

by:
cartti earned 50 total points
ID: 1615551
The property MarkerStyle has a number of settings that relate to the type of points you see on line, scatter and radar charts. Within these charts, you can format individual or entire series of points. For example, this can include square, diamond, minus shapes etc. AND imported bitmaps. as representations of the selected points Depending on which type of points you select, determines the setting of MarkerStyle or vice versa.

One of these settings that you want to know about is xlMarkerStylePicture. This (if you haven't guessed already) is the setting for bitmaps to be showed as points on those aforementioned graphs.

An example of how to use it is as follows:

Say you have a line graph with one series of points. To change the current setting of points to plus shapes and then to a bitmap do the following. Change 'my_pic' to an existing picture file on your hard drive which should include the location (e.g. "C:/temp/my_pic.bmp").

Open a new workbook and paste the following code into a macro.

Sub Test()
    Range("A1:A10").FormulaArray = "=RAND()"
    With Charts.Add().Location(Where:=xlLocationAsObject, Name:=ActiveSheet.Name)
        .ChartType = xlLineMarkers
        .SetSourceData Source:=Sheets(1).Range("A1:A10"), PlotBy:=xlColumns
        .Legend.Delete
    End With

    ActiveChart.SeriesCollection(1).MarkerStyle = xlPlus
   
    For x = 1 To 10000
       DoEvents
    Next
   
    ActiveChart.SeriesCollection(1).Fill.UserPicture PictureFile:="my_pic"
   
    If ActiveChart.SeriesCollection(1).MarkerStyle = xlMarkerStylePicture Then
       MsgBox "MarkerStyle property set to xlMarkerStylePicture"
    Else
       MsgBox "Possible problems setting picture"
    End If
End Sub
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now