I am a newbie, what I want to do is open a word document and do some find actions from Text1, but when I click the commandButton in second time, there is no action with the commandButton
here is my code :
Could you give me the solutions please ?
here is my code :
Code:
Dim doc As Word.Application
Dim val As Boolean
Private Sub Command1_Click()
If val <> True Then
Set doc = New Word.Application
doc.Visible = True
doc.Documents.Open "\..\myDoc.doc"
doc.Selection.Find.Execute Text1.Text
val = True
ElseIf val = True Then
doc.Selection.Find.Execute Text1.Text
End If
End SubCould you give me the solutions please ?