Excel vba.Interior.ColorIndex不';我不能正常工作
我有两个细胞:绿色和紫色。我有密码:Excel vba.Interior.ColorIndex不';我不能正常工作,vba,excel,Vba,Excel,我有两个细胞:绿色和紫色。我有密码: Sub test() With Selection.Interior MsgBox (.ColorIndex) End With End Sub 为什么带有数字15的MsgBox同时显示绿色和紫色。 当我使用代码时 Sub test() With Selection.Interior MsgBox (.Color) End With End Sub 它给出了不同的数字,但对于绿色和紫色是唯
Sub test()
With Selection.Interior
MsgBox (.ColorIndex)
End With
End Sub
为什么带有数字15的MsgBox
同时显示绿色和紫色。
当我使用代码时
Sub test()
With Selection.Interior
MsgBox (.Color)
End With
End Sub
它给出了不同的数字,但对于绿色和紫色是唯一的:10213316
和13082801
为什么ColorIndex
给出相同的数字,为什么Color
给出不同且唯一的数字
在代码中使用.Color
返回的数字是否安全?它会随着计算机的不同而变化吗?.Color
是比.ColorIndex
更宽的调色板(它定义了更多的颜色)。ColorIndex必须近似以弥补较少定义的颜色和颜色的阴影
仅供参考。周围的颜色是多余的,最终会咬到你的屁股。