hope this is the right forum,
In visual Basic I am trying to pass a variable from one form to another, I have no idea how to do it, unless putting it into a public variable (which I really don't want to do), I would like to pass it as you would with a function: ie
functionname(variable1, var2, var3) and so on
I'm sure there is a way to do it with forms:
form1.show(var1, var2, var) but cannot get it to work?
any suggestions? I'm sure it is really easy - but I am a bit slow
You can't pass variables that way. You need to place the values into objects on the second form.
If they are text boxes you need to give them focus first so you might want to make sure the form is hidden before hand so there is no flickering.
form2.object1.value = variable1
form2.object2.value = variable2