|
'
This function will launch the Wedge feeding it the name of
a configuration file on
' the command line causing the Wedge to automatically load
the config file and
' activate itself
CmdLine = "C:\winwedge\winwedge.exe C:\winwedge\test.SW3"
' Change "CmdLine" to specify
the correct path for your copy of WinWedge.Exe
' Make sure that the complete path is
specified for your configuration file as well
RetVal = Shell(CmdLine)
|
|
x = Now + .00002
Do While Now < x
DoEvents
Loop
If RetVal = 0 Then
Beep
|
'
wait for roughly 2 seconds
' give wedge time to load and activate itself
' allow other Windows processes to continue
' launch failed
' warn user and exit
|
|
MsgBox ("Cannot
Find WinWedge.Exe")
|
|
Exit Function
Else
AppActivate "Microsoft Access"
End If
|
'
launch succeeded
' set the focus back to Access
|
|
End Function
Function KillWedge
() ' This function unloads the
Wedge from memory
|
|
chan = DDEInitiate("WinWedge",
"Com1")
|
'
initiate DDE channel with wedge on
' COM1
|
|
DDEExecute
chan, "[AppExit]"
|
'
send AppExit command to Wedge
|
|
'
no need for a DDETerminate statement here because Wedge
is no longer running
|
|