As title explains. The image below shows a userform with 66 labels each with the name of a Bible book. I.e., I just changed the name of Label1 to Genesis, etc.
When a user clicks on that label, it automatically puts its label name in Textbox1. That's it. That's all I want to accomplish. The form is opened with a button
on another userform. has to be geneic. That is, to be able to be used with any new userform. I've gotten this far with the code below but can't figure out how
to make it generic.
Easy enough. But that would mean I'd have to code all 66 labels each with their given Bible book name and assign their value to Textbox1.
I want to use this for several different userforms, Userform1, Userform2 Userform3, etc, that have a Textbox as an input value of the label name to assign to a Find method. It seems there should be a much simpler, more elegant way to do this, either with a For Loop or using a Function call but I've not
figured out how to do this. The images below show what I've done. The operation is ver simple: a Book label name is clicked which displays a chapter userform which when any label is clicked displays a final verse userform. The last click completes putting the verse to Find in Textbox1 on the calling userform.
If I can cant this to work with just one userform, I can apply it to the other two.
Did not intended to over describe, but I wanted to be compete so as to give a full understanding of the endpoint to be accomplished: Textbox1.value = "Genesis 12:3"
Any help would be greatly appreciated.
Many thanks,
cr
When a user clicks on that label, it automatically puts its label name in Textbox1. That's it. That's all I want to accomplish. The form is opened with a button
on another userform. has to be geneic. That is, to be able to be used with any new userform. I've gotten this far with the code below but can't figure out how
to make it generic.
Code:
Private Sub Genesis_Click()
TextBox1.Value = "Genesis"
End Sub
Private Sub Exodus_Click()
TextBox1.Value = "Exodus"
End Sub
Easy enough. But that would mean I'd have to code all 66 labels each with their given Bible book name and assign their value to Textbox1.
I want to use this for several different userforms, Userform1, Userform2 Userform3, etc, that have a Textbox as an input value of the label name to assign to a Find method. It seems there should be a much simpler, more elegant way to do this, either with a For Loop or using a Function call but I've not
figured out how to do this. The images below show what I've done. The operation is ver simple: a Book label name is clicked which displays a chapter userform which when any label is clicked displays a final verse userform. The last click completes putting the verse to Find in Textbox1 on the calling userform.
If I can cant this to work with just one userform, I can apply it to the other two.
Did not intended to over describe, but I wanted to be compete so as to give a full understanding of the endpoint to be accomplished: Textbox1.value = "Genesis 12:3"
Any help would be greatly appreciated.
Many thanks,
cr