Skip to main content
I have one number at rumba position 3.20. If my number is 1 it should change to 2, if it is 2 it should chage to 3. Maximum number is upto 5. Is it possible?

#Rumba
I have one number at rumba position 3.20. If my number is 1 it should change to 2, if it is 2 it should chage to 3. Maximum number is upto 5. Is it possible?

#Rumba

That's possible try this:

Sub Main

Dim ScreenText As String

Dim pCol, pRow , pLen As Integer

pRow = 3

pCol = 20

pLen = 1

EMReadScreen ScreenText,pLen,pRow, pCol

If ScreenText = " " Then 'Evaluate ScreentText

MsgBox "Empty ScreenText"

Exit Sub

End If

If IsNumeric(ScreenText) = True And (ScreenText < 6) Then ' Evaluate ScreenText.

newVar = Cint(ScreenText) 1

EMWriteScreen newVar, pRow, pCol

If NM_ResultCode <> VS_SUCCESS Then

MsgBox "Write Screen Error"

End If

Else

MsgBox "Screen Data is not numeric or greater 5." ' Message if not.

End If

End Sub