Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. Complete in Excel and show your work Question 3: Public and a Private Variable Sub-Procedure - Please create two Modules and write Sub-Procedures include
3. Complete in Excel and show your work
Question 3: Public and a Private Variable Sub-Procedure - Please create two Modules and write Sub-Procedures include a Public variable and Private variables as in the Lecture 2 slide Example 3 on page 32 . - Note: Variable declaration is necessary to define a variable for a certain data type. Run the sub-procedure to make sure it works correctly. Public and Private Variable Example 3 Dim x As Integer Public p As Integer Sub sub1Example3() Dim x As Integer p=1 x=0 x=0 MsgBox ("x in sub 1= " \& x ) Sub sub3Example3 () MsgBox ("p in sub 1= " \& p) MsgBox ("x in sub 3= " \& x ) Call sub2Example3 MsgBox ("p in sub 3=" \& p) Call sub3Example3 End Sub End Sub Module 2 Sub sub2Example3 () MsgBox ("x in sub 2= " \& x ) MsgBox ("p in sub 2= " \& p) End SubStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started