J
Jason Logue
How do I call or dim an event from a previous procedure in
a userform? I am using userforms, and the user will click
on a button to open another window, and in that window
they will click another button, and finally, in the last
window they will click another button that initiates code
that goes out finds bookmarked text and plops it into a
textbox adjacent to the first button in the first
userform. I would like the code under the final
commanbutton to determine which original button was
clicked and insert the text appropriately. Here is what I
have so far:
Sub CommandButton1_Click()
Set source = Documents.Open("C:\Documents and
Settings\Logue\My Documents\Allied
Title\exceptions\exceptions.doc")
(this is where the bookmarked text is located)
If Userform3.ExceptionsButton1_Click Then
(my attempt to tell say if the button was clicked in
userform3, which is the starting place of this whole
event, then the following code will take place)
Userform3.TextBox8.Text = source.Bookmarks
("Chapter1_1").Range
End If
(and if it was clicked, then it moves on to this next bit
of code and so on)
If Userform3.ExceptionsButton3_Click Then
Userform3.TextBox4.Text = source.Bookmarks
("Chapter1_1").Range
End If
and it goes on...
Right now it's either doing nothing or inserting code in
every textbox on the original userform. Any suggestions
are welcome.
TIA,
Jason
a userform? I am using userforms, and the user will click
on a button to open another window, and in that window
they will click another button, and finally, in the last
window they will click another button that initiates code
that goes out finds bookmarked text and plops it into a
textbox adjacent to the first button in the first
userform. I would like the code under the final
commanbutton to determine which original button was
clicked and insert the text appropriately. Here is what I
have so far:
Sub CommandButton1_Click()
Set source = Documents.Open("C:\Documents and
Settings\Logue\My Documents\Allied
Title\exceptions\exceptions.doc")
(this is where the bookmarked text is located)
If Userform3.ExceptionsButton1_Click Then
(my attempt to tell say if the button was clicked in
userform3, which is the starting place of this whole
event, then the following code will take place)
Userform3.TextBox8.Text = source.Bookmarks
("Chapter1_1").Range
End If
(and if it was clicked, then it moves on to this next bit
of code and so on)
If Userform3.ExceptionsButton3_Click Then
Userform3.TextBox4.Text = source.Bookmarks
("Chapter1_1").Range
End If
and it goes on...
Right now it's either doing nothing or inserting code in
every textbox on the original userform. Any suggestions
are welcome.
TIA,
Jason