Get Font Color from Excel using Invoke VBA

Hi Everyone,

Currently I am trying to Get Font Color from Excel using Invoke VBA.
In this example, I tried to get the colorindex from cell A2 (font is red color).
I am expecting the output result = 3.
However the output return as = - 2146826273

Can anyone let me know how I can edit this code to get the output as 3

Kindly refer to below picture and source for more details

vba code

Result

GetFontColor.zip (44.1 KB)

Anyone could help me on this issue. I am stuck to continue on my development. Appreciate if anyone can share some ideas.

Found a solution by following this thread

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.