I would like this message box to display the value it calculates in Counter.. what is the correct syntax.

MsgBox "'Counter'" + "Records Added Successfully"
Tony CrisafiManaging DirectorAsked:
Who is Participating?
Subodh Tiwari (Neeraj)Connect With a Mentor Excel & VBA ExpertCommented:
Try it like this....
MsgBox Counter, vbInformation, "Records Added Successfully"

Open in new window

Roy CoxGroup Finance ManagerCommented:
Is Counter a variable that is declared in the code. The message box should display after the value has been set.
MsgBox Counter & "  Records Added Successfully", VBInformation,"Completed"

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.