I am facing one small problem please help me.
sub vari()
dim b as integer
dim c as integer
b=6
c=8
end sub
now i want to use b and c in another function .
sub calculate()
dim a as integer
a = c+b
end sub
I am getting error here
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You want to use the proper scope for your variables. If you want for b and c to be accessible to both vari() and calculate() you need to declare them globally, like so: