Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel VBA标记样式_Vba_Excel - Fatal编程技术网

Excel VBA标记样式

Excel VBA标记样式,vba,excel,Vba,Excel,我正在尝试将系列标记样式更改为交叉X 我已在新的excel文件中创建了测试脚本,其中包含: ActiveChart.SeriesCollection(1).Select Selection.MarkerStyle = xlMarkerStyleX 而且效果很好。我有: Worksheets("RecordID Chart").ChartObjects(1).Activate ActiveChart.SeriesCollection.NewSeries ActiveCha

我正在尝试将系列标记样式更改为交叉X

我已在新的excel文件中创建了测试脚本,其中包含:

ActiveChart.SeriesCollection(1).Select
Selection.MarkerStyle = xlMarkerStyleX
而且效果很好。我有:

    Worksheets("RecordID Chart").ChartObjects(1).Activate
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(graph + 2).Name = lo.ListColumns("RecordID").DataBodyRange.Rows(1)
    ActiveChart.SeriesCollection(graph + 2).XValues = tesPercentage
    ActiveChart.SeriesCollection(graph + 2).Values = testError
    ActiveChart.SeriesCollection(graph + 2).MarkerStyle = xlMarkerStyleX
    ActiveChart.SeriesCollection(graph + 2).MarkerSize = 5
    ActiveChart.SeriesCollection(graph + 2).Format.Line.ForeColor.RGB = myCol & graph
    ActiveChart.SeriesCollection(graph + 2).Select
    Selection.Format.Line.Visible = msoFalse
有人有主意吗

实际上,它是十字架,但不显示为十字架:


所以我认为它在标记填充或标记线颜色方面存在一些问题。。。我仍然感到困惑。

看起来您的标记填充颜色与标记前景颜色相同。您需要更改它。

看起来您的标记填充颜色与标记前景色相同。您需要更改它。

看起来您的标记填充颜色与标记前景色相同。您需要更改它。

看起来您的标记填充颜色与标记前景色相同。您需要对其进行更改。

假设这将达到以下目的:

ActiveChart.SeriesCollection(1).Select
With Selection
    .MarkerStyle = xlMarkerStyleX
    .MarkerSize = 7
    .MarkerBackgroundColorIndex = xlColorIndexNone
    .MarkerForegroundColorIndex = xlColorIndexAutomatic
End With

假设这将达到以下目的:

ActiveChart.SeriesCollection(1).Select
With Selection
    .MarkerStyle = xlMarkerStyleX
    .MarkerSize = 7
    .MarkerBackgroundColorIndex = xlColorIndexNone
    .MarkerForegroundColorIndex = xlColorIndexAutomatic
End With

假设这将达到以下目的:

ActiveChart.SeriesCollection(1).Select
With Selection
    .MarkerStyle = xlMarkerStyleX
    .MarkerSize = 7
    .MarkerBackgroundColorIndex = xlColorIndexNone
    .MarkerForegroundColorIndex = xlColorIndexAutomatic
End With

假设这将达到以下目的:

ActiveChart.SeriesCollection(1).Select
With Selection
    .MarkerStyle = xlMarkerStyleX
    .MarkerSize = 7
    .MarkerBackgroundColorIndex = xlColorIndexNone
    .MarkerForegroundColorIndex = xlColorIndexAutomatic
End With


ActiveChart.SeriesCollection(graph+2).MarkerForegroundColorIndex=2
我添加了这个,并期望它能解决这个问题,但我有同样的问题。你是否也尝试使用内置对话框来更改它?听起来有些不同,你能说得更具体一点吗?试着转到图表,右键单击改变标记填充。如果我将标记填充设置为白色,则十字和背景消失。非常奇怪,我只需要去掉背景色…
ActiveChart.SeriesCollection(graph+2).MarkerForegroundColorIndex=2
我添加了这个,并期望它能解决这个问题,但我有同样的问题。你是否也尝试使用内置对话框来更改它?听起来有些不同,你能说得更具体一点吗?试着转到图表,右键单击改变标记填充。如果我将标记填充设置为白色,则十字和背景消失。非常奇怪,我只需要去掉背景色…
ActiveChart.SeriesCollection(graph+2).MarkerForegroundColorIndex=2
我添加了这个,并期望它能解决这个问题,但我有同样的问题。你是否也尝试使用内置对话框来更改它?听起来有些不同,你能说得更具体一点吗?试着转到图表,右键单击改变标记填充。如果我将标记填充设置为白色,则十字和背景消失。非常奇怪,我只需要去掉背景色…
ActiveChart.SeriesCollection(graph+2).MarkerForegroundColorIndex=2
我添加了这个,并期望它能解决这个问题,但我有同样的问题。你是否也尝试使用内置对话框来更改它?听起来有些不同,你能说得更具体一点吗?试着转到图表,右键单击改变标记填充。如果我将标记填充设置为白色,则十字和背景消失。很奇怪,我只需要去掉背景色。。。