I'm getting the error message "Compile Error: Named argument not found," when I try to run my VBA code. VBA doesn't seem to recognize the last property
Dim dump As VbMsgBoxResult dump = VBA.Interaction.MsgBox _ Title:="Invalid Scope!", _ Prompt:="You entered Invalid Scope !!!", _ VbMsgBoxStyle:=vbCritical
On the other hand my Object Browser shows this for MsgBox:
Function MsgBox(Prompt, [Buttons As VbMsgBoxStyle = vbOKOnly], [Title], [HelpFile], [Context]) As VbMsgBoxResult Member of VBA.Interaction
Does anyone have an idea why this is happening?