If it was anyone else's code, I'd probably have ignored compiler
warnings.

On a different subject - VB string handling is ugly !
I've been playing with a VB interface to the Xmail admin server,
learning VB as I go.  Here are a couple of functions which might be of
use to anyone doing the same.  Both return a string formatted for the
server.

The first takes the command and parameters as a single string, separated
by semi-colons - sCommandString=xmCmdStr1("userstat;domain;username")

The second takes the command and the params as individual string
variables -
sCommandString=xmCmdStr("userstat","domain","username")


Dan



Public Function xmCmdStr1(sCmd As String) As String
xmCmdStr = """" + Replace(sCmd, ";", """" + vbTab + """") + """" +
vbCrLf
End Function

Public Function xmCmdStr(ParamArray sWords() As Variant) As String
Dim sWord As Variant
Dim sRet As String
For Each sWord In sWords
sRet = sRet + """" + sWord + """" + vbTab
Next sWord
sRet = Left(sRet, Len(sRet) - 1) 'get rid of the trailing TAB
xmCmdStr = sRet + vbCrLf
End Function

-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to