Rem Statement
The Rem statement identifies a line of code as a comment in Visual Basic code. It does not return a value. A code line that begins with a single quote (') also identifies a comment.
Format
Rem comment
The following example code is attached to a button on the Account Form applet that counts the number of corresponding child contact records:
Sub Button1_Click
Dim i as Integer
Dim icount as Integer
Dim oBC as BusComp
Rem Test this from the Account Contacts View
Rem This code presumes that Account is the parent BusComp
Rem BusObject returns the business object
Rem associated with a control or applet.
Rem GetBusComp here returns a reference
Rem to the BC that is in the UI context.
set oBC = me.BusObject.GetBusComp("Contact")
Rem FirstRecord positions you at the
Rem first record in the business component.
Rem FirstRecord, NextRecord, and so forth, do not return Booleans.
Rem Siebel VB does not have a Boolean data type.
i = oBC.FirstRecord Rem Returns 0 if fails, 1 if succeeds
if i <> 1 then
else
icount = 0
Rem This is a sample of using a while statement to loop.
Rem NextRecord returns 1 if it succesfully
Rem moved to the next record in the BC
While i = 1
icount = icount + 1
i = oBC.NextRecord Rem Returns 1 if successful
wend
oBC.FirstRecord
end if
End Sub