Link to home
Start Free TrialLog in
Avatar of XabdullahX
XabdullahX

asked on

Where do i store output data from module?

As the title says.

Lets say i have this module:

public sub answer(byval number as integer)
number = number + 1
end sub

I want to make something as

if answer = 5 then
'do something
end if

Hope i was clear and you can help

(This is Visual basic.net, dont know if that category exist, so i put it in vbs category)
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

> Zones:
>Visual Basic Programming, Microsoft Visual Basic.Net

so, all is right...


in regards to the question, where is the problem:

public sub answer(byval number as integer)
  number = number + 1
 
 if answer = 5 then
  'do something
 end if
 
end sub

Open in new window

Avatar of XabdullahX
XabdullahX

ASKER

This code should be in the module1.vb
public sub answer(byval number as integer)
  number = number + 1


My question is, how do i use this:

 if answer = 5 then
  'do something
 end if

on my form1 ?
>on my form1 ?
hmmm, can you explain that?

I made a simple example:

Here is the picture:

http://i.arcadeskillz.com/pics/Unavngivet417.JPG
ASKER CERTIFIED SOLUTION
Avatar of srikanthreddyn143
srikanthreddyn143

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nice thx
XabdullahX, why B Grade?
Because you dont tell me the exact code, only what to do, so i googled public variables a bit and found the solution :)