Skip to content

unexpected(?) errors when using msoRGBType variables #5992

Open
@interservices

Description

@interservices

Version 2.5.2.5906
OS: Microsoft Windows NT 10.0.22000.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.15225.20288
Host Executable: EXCEL.EXE


The following debug-passing code, that I also found on [Stackoverflow],(https://stackoverflow.com/questions/28809779/vba-valid-rgb-value-throws-out-of-range-exception) throws 4 unexpected(?) RD errors (!):

Sub TEST()
    Dim light As MsoRGBType
    light = RGB(195, 214, 155)
    ActiveSheet.Shapes("Arrow1").Line.ForeColor.RGB = light
End Sub

Immagine 2022-06-28 101719

I think that the errors are related to the ambiguity of the RGB values, that are Long and msoRGBType object(?) at the same time. I'm honestly confused about this fact, so I'm not sure about how RubberDuck should behave in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIdentifies work items for known bugsdifficulty-03-duckInvolves more challenging problems and/or developing within and revising the internals APIresolverIssue is easier to resolve with knowledge of the internal resolver API and the Antlr4 parse trees.

    Type

    No type

    Projects

    Status

    Backlog | Resolver

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions