How to create a window pop up vba?

Asked By 30 points N/A Posted on -

Hi guys,

How to create a window pop up vba? I am using visual basic for my new department store system and want to get some codes to possibly perform popping up window for the total purchase of the customer. Can you share some video tutorial regarding visual basic?

Expecting some help, thank you.

Best Answer by Frater Dessin
Answered By 0 points N/A #173019

How to create a window pop up vba?


Hi Pamela,

It is very easy to show a pop-up window or message on Visual Basic.


Option 1: You need to write the msgbox command to display a pop up window.

You can add the LINE BELOW where you want to display the details:

MsgBox <<variable name>>


Option 2: You can show a custom pop up message box. 

Refer to the video:



Best Answer
Best Answer
Answered By 0 points N/A #173020

How to create a window pop up vba?


Please refer to the below instructions to create a window pop-up using visual basic. You should have some knowledge about the software for performing the below steps.

1. Open your VB projects from the Visual Studio. Then after the solution explorer window opens, click and open your startup file. Then the design window should open.

2. Click the "view" from the menu and go to "toolbox". Then click on the "button" control and place a new button within the form.

3. Then click on the button you already created and then it will open a code window.

4. Then on the "method" enter the following codes and enter your own value within the quotes that you want to display.

Dim messageText As String = " "

Dim responseButtons As MessageBoxButtons = MessageBoxButtons.YesNo

Dim popupCaption As String = " "

Dim popupResult As DialogResult

popup Result =

If popup Result = System.Windows.Forms.DialogResult.Yes Then

Me. Text = "Continue Chosen"

End If

5. Click on F5 and run the commands in order to confirm the codes.

* Please refer to the below YouTube video tutorials in order to get a better idea about the process.


Login/Register to Answer

Related Questions