Solved

XL97 HowTo use xlMarkerStylePicture?

Posted on 1999-01-11
1
1,164 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
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 …

756 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