Solved

XL97 HowTo use xlMarkerStylePicture?

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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Recover lost Hyperlink destination/target in OneNote 3 37
Excel 2016 - Black cell borders 11 34
Create Form using Wizard 14 42
Office 2016 Temp Files 3 29
Some time ago I was asked to create a VBA function that would calculate a check digit for an input number, using the following procedure: First, sum up all the individual digits in the number If that sum value has more than one digit, then sum up …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

770 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