DDE script example

The following example, written in VBA, illustrates a DDE script that takes a user directly to the Database Manager from the login screen. Before executing this script, you must be on a Service Manager login screen.

Sub SC()
	Dim nChannel As Long
	Dim strReturned As String
	nChannel = DDEInitiate("Service Manager", "ActiveForm")
	DDEPoke nChannel, "$user.id", "falcon"
	DDEExecute nChannel, "[Transact( ""0"" )]"' login
	DDEExecute nChannel, "[Transact( ""1"" )]"' go to the command interface
	DDEPoke nChannel, "$command", "db"' go to the Database Manager
	DDEExecute nChannel, "[Transact( ""0"" )]"
	DDEExecute nChannel, "[SetFocus( ""file.name"" )]" ' set the focus in the file name box
	DDETerminate nChannel
	End Sub