Microsoft
Software
Hardware
Network
Question : XL97 HowTo use xlMarkerStylePicture?
XL97: How do I use the constant xlMarkerStylePicture? It's a constant of the property MarkerStyle. The Help files do not have this information.
Answer : XL97 HowTo use xlMarkerStylePicture?
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").FormulaArr
ay = "=RAND()"
With Charts.Add().Location(Wher
e:=xlLocat
ionAsObjec
t, Name:=ActiveSheet.Name)
.ChartType = xlLineMarkers
.SetSourceData Source:=Sheets(1).Range("A
1:A10"), PlotBy:=xlColumns
.Legend.Delete
End With
ActiveChart.SeriesCollecti
on(1).Mark
erStyle = xlPlus
For x = 1 To 10000
DoEvents
Next
ActiveChart.SeriesCollecti
on(1).Fill
.UserPictu
re PictureFile:="my_pic"
If ActiveChart.SeriesCollecti
on(1).Mark
erStyle = xlMarkerStylePicture Then
MsgBox "MarkerStyle property set to xlMarkerStylePicture"
Else
MsgBox "Possible problems setting picture"
End If
End Sub
Random Solutions
windows 3d application launcher gadget
Open new window with specified size and without menu and toolbar from an application
Batch file for copying folder named as yesterday
Seeking an example database that uses ADO coding
VBA Loop through record names
Slow Logon
I need to strip out every vbCrLF from a field
Microsoft, Office, 2007, Change User Menus & interfaces to English
Renumbering Primary key after delete
Sort a SortedDictionary based on value, not key - C#.net MVC