Home > OS >  How does the VBA IsMissing function work under the hood?
How does the VBA IsMissing function work under the hood?

Time:10-12

According to the docs:

IsMissing does not work on simple data types (such as Integer or Double) because, unlike Variants, they don't have a provision for a "missing" flag bit

But in the tagVARIANT struct I don't see anything about a flag that can be set, I was wondering if the vartype embeds this info like how it embeds ByRef with VT_BYREF (what does VT_RESERVED mean?) but I'm not sure.

CodePudding user response:

The "missing" variant is a VARIANT with the vt member (VARTYPE) set to VT_ERROR and the scode member set to DISP_E_PARAMNOTFOUND (0x80020004).

  • Related