Share via

MsgBox compile error

Anonymous
2016-12-19T05:58:27+00:00

Dearest Wizards,

Maybe an odd question but,

Working on a big project, thousands of lines of VBA code.  Having the usual trouble with crashes and 'trying' to resolve them with MsgBox diagnostics.  Strange thing going on though.  When I try to use MsgBox something is happening (compiler?) that it changes the text to msgbox (lower case) and gives an error message:

Compile error:

Wrong number of arguments or invalid property assignment

Interestingly, prior saves of the file from months ago don't give me this problem/error; the MsgBox function works great.  Is this an update issue?  Anyone else having the same problem?

TIA,

Sam

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2016-12-19T06:35:58+00:00

Have you created a procedure (sub) or function named msgbox, perhaps? Search your code for all uses of msgbox.

Also, make sure that you haven't given a module or userform the name msgbox.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2016-12-19T15:45:47+00:00

    Hans,

    You were spot on!  I had done exactly as you had suspected.  All is working much better now; thank you for the help!!

    Sam

    Was this answer helpful?

    0 comments No comments