0

If I do:

MsgBox "my text or whatever"
MsgBox "my text or whatever"

They just go 1 after the other and if I do:

MsgBox "my text or whatever" + MsgBox "my text or whatever"

I get an error. I am very new to VBS but I couldn't really find much on this. Any help would be much appreciated.

Qstz D
  • 3
  • 3
  • It would help to provide some detail about why you want two message boxes on screen at once. Maybe an alternative approach can be used, such as an HTA, which will allow you to use HTML/CSS to display whatever you like. Please edit your question to add detail. – LesFerch Feb 19 '22 at 01:03
  • If you mean that you want display two or more messages in one MsgBox you can do it by adding `vbCrlf` otherwise , you can't ! – Hackoo Feb 19 '22 at 03:28
  • @Hackoo It can be done indirectly by spawning a separate script for each `MsgBox`, but is that really the best solution? Probably not (unless it's a stupid prank app). – LesFerch Feb 19 '22 at 05:27
  • Conceptually a `MessageBox()` (called `MsgBox` in Basic) is a modal dialog. There are two types of dialog - modal and modeless. For modal dialog the program calls the `MessageBox()`, and all program code stops (in single threaded VBS) until that procedure returns with a result. See https://learn.microsoft.com/en-us/windows/win32/dlgbox/about-dialog-boxes – KL-1 Feb 19 '22 at 06:02
  • Does this answer your question? [How to use \n new line in VB msgbox() ...?](https://stackoverflow.com/questions/5152042/how-to-use-n-new-line-in-vb-msgbox) – user692942 Feb 19 '22 at 22:25

0 Answers0