![]() Long will allow us to consider any length of number.ĭim Num1 As Long Dim Num2 As Long Dim Ans1 As Long End Sub We can use Integer or Double as well, depending on one’s use. And it gives a Subcategory in any name as shown below.ĭefine 3 variables Num1, Num2, and Ans1 in DIM and assign then with Long. Let’s see another example where we will use a Call function to call different subcategory. So it’s all up to us, which Sub procedure or category we want to call first. It will pop up the message stored in the second subprocedure first which is “ Second” followed by the message “ First” when we click on Ok as shown below. What if we change the position of Call function from before End to after the first Subcategory as shown below? Now let run the complete code again. ![]() And if click on Ok again, then it will exit from the procedure. Once we do that, we will get the second message box containing the message “ Second” as shown below. We will see the message box named with the message “First”. Now compile the complete code from start to end and run it. Hereafter MsgBox we are using Call followed by Arriving which is the subcategory name of the code written below. This will be used in the first subcategory.įor this type Call in the first subcategory before End, followed by the name of that subcategory whose code we want to call. ![]() Here comes the function CALL, which we will use to call both messages one by one. Now if we run the complete code then we will get the output of only last Subcategory which is a message box containing message “ Second” as shown below. ![]() ![]() Here we have given it “ Second” as shown below. In that again use the command MsgBox and give it message or text as per your choice. Now after the End in the same module, write another Subcategory or procedure in any name as shown below. We will see a message box containing the message “ First” as shown below. Now compile the code and run it by clicking on the Play button which is below the menu bar. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |