visual basic - code - how to call SubCode

P

Pekka I.

Question, most likely stupid one, but since I am not too familiar with
visual basic, i need some help;

I have a button in a Form, by pressing button, visual code is called.

Private Sub Set_H1_Click()
Me.Secret_H1 = RandomPassword128H1()
--> here it should also set value for Secret_H2 = RandomPassword128H2
End Sub

and code is setting the value of Secret_H1 from RandomPassword128H1

question; I would like the same code to set also values for Secret_H2,
SecretH3 etc, how can I call those, so i wouldnt need to make button for
setting each value, How ?
 
G

GraemeR

Hi, is this what you're after?

Private Sub Set_H1_Click()
Me.Secret_H1 = RandomPassword128H1()
Me.Secret_H2 = RandomPassword128H2()
Me.Secret_H3 = RandomPassword128H3()
' etc.
End Sub

Graeme.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top