2. By putting money= 200 in a subroutine you're creating a scope problem; code it inline in the module. caliorg is undefined...you may not have posted enough code.
i already have my money save as single
money = 200 and i want to do a further calculation with it.
Module:
Public money as Single
Public nUnit as interger
Private Sub Form1_activate()
money = 200
caliorg = 25.50
and nUnit is a number the user specify
End Sub
Private Sub Buy_Click()
If Option1.Value = True Then
money = money - (caliorg * nUnit)
backpack.Caption = caliorg & " " & nUnit & "Unit"
End If
End Sub
This it what i want to do but it doesnot work
3. I can't make out from your code what you're trying to do but I think days only has scope within the subroutine and reverts back to zero after the subroutine ends. Try making days a global field.
I want to click on a button that will change its number by 1 every time i click on it. So what i mean is that every time i click the button it will add up the number of 1 everytime.
4. Not sure on this; you can always use the unload method on the form followed by the load method. Why would you need to do this? Forms are updated as the underlying data changes.
True i dont really need this
5. Use the rand() function.
How can i limit the number.
Let say i want the number to by random between 10 - 30 and it go to be single so sometime the number will be 15.67 or 20.64 ect.