grommit1411
Programmer
This code is in Form1 :-
Private Sub Command1_Click()
Call txtSend("Example 1", Form1)
End Sub
Private Sub Command2_Click()
Call txtSend("Example 2", Form1)
End Sub
This code is in Module1 :-
Function txtSend(TextToSend As String, f As Form)
With f
.Text1.LinkTopic = "Excel|Sheet1"
.Text1.LinkItem = "R1C1"
.Text1.LinkMode = 1
.Text1.Text = TextToSend
.Text1.LinkPoke
End With
End Function
how do i substitute Text1 like i have done with the form?
An empty excel workbook must be open for this to work.
grommit
Private Sub Command1_Click()
Call txtSend("Example 1", Form1)
End Sub
Private Sub Command2_Click()
Call txtSend("Example 2", Form1)
End Sub
This code is in Module1 :-
Function txtSend(TextToSend As String, f As Form)
With f
.Text1.LinkTopic = "Excel|Sheet1"
.Text1.LinkItem = "R1C1"
.Text1.LinkMode = 1
.Text1.Text = TextToSend
.Text1.LinkPoke
End With
End Function
how do i substitute Text1 like i have done with the form?
An empty excel workbook must be open for this to work.
grommit