Home > Language Reference > Classes > Telephony

SendUSSD Method

Sends an USSD query.

Syntax

Public Sub SendUSSD(ByRef sCmd As String)

ParameterDescription
sCmdCommand to send.

Remarks

The SendUSSD method sends an USSD query. This method is only available on GSM phones and the phone must be attached to the network, otherwise a runtime error occurs.

The sCmd parameter is the command to send, usually a combination of digits, sharps (#) and stars (*). Most queries depends on your provider and on the services it offers, but some commands tend to be standardized. For example, the following code will successfully report your bill status on many european networks:

Private Tel As New Telephony

Private Sub Button1_Click()
  If Tel.Attached And Tel.PhoneType=hbPhoneGSM Then
    Tel.SendUSSD "#123#"
  End If
End Sub

The SendUSSD method will not return until the query is successfully processed. Some queries trigger a response from the network requiring the default telephony application to be launched. To allow this, your application should be ready to exit just after this method return, and notably not undertake any lengthy operation.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 5.0Only available on smart phone devices.