Solved

XL97 HowTo use xlMarkerStylePicture?

Posted on 1999-01-11
1
1,133 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

910 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

21 Experts available now in Live!

Get 1:1 Help Now