A
Aidy
Firstly thanks Jonathan for your reply re: class modules.
This is my current problem.
I have got the below code in a VBA class module
<snip>
Option Explicit
Private mWaitForString As String
Private mStringToSend As String
Private WithEvents m_ttHost As teemtalk.Host
Public Sub WaitAndSend()
Set m_ttHost = CurrentSession.Host
With m_ttHost
.ClearWaitFors
.WaitFor mWaitForString
End With
End Sub
Private Sub m_ttHost_OnWaitforString(ByVal WaitFor As String)
If (WaitFor = mWaitForString) Then
m_ttHost.Send mStringToSend
End If
End Sub
Public Property Let WaitForString(sWaitforString As String)
mWaitForString = sWaitforString
End Property
Public Property Let StringToSend(sStringToSend As String)
mStringToSend = sStringToSend
End Property
<snip>
Now, I want to instantiate this class and set the properties in
a normal module
This is where I am
<snip>
Public obj As WaitForClass
Sub test()
Set obj = New WaitForClass
obj.WaitAndSend
End Sub
<snip>
Thank You
Aidy
This is my current problem.
I have got the below code in a VBA class module
<snip>
Option Explicit
Private mWaitForString As String
Private mStringToSend As String
Private WithEvents m_ttHost As teemtalk.Host
Public Sub WaitAndSend()
Set m_ttHost = CurrentSession.Host
With m_ttHost
.ClearWaitFors
.WaitFor mWaitForString
End With
End Sub
Private Sub m_ttHost_OnWaitforString(ByVal WaitFor As String)
If (WaitFor = mWaitForString) Then
m_ttHost.Send mStringToSend
End If
End Sub
Public Property Let WaitForString(sWaitforString As String)
mWaitForString = sWaitforString
End Property
Public Property Let StringToSend(sStringToSend As String)
mStringToSend = sStringToSend
End Property
<snip>
Now, I want to instantiate this class and set the properties in
a normal module
This is where I am
<snip>
Public obj As WaitForClass
Sub test()
Set obj = New WaitForClass
obj.WaitAndSend
End Sub
<snip>
Thank You
Aidy