Hi Excel Gurus,
I have an "If" condition that if its evaluated to "True', execute something anf if it doesn't do something else but even though the if condition is True it always goes to Else condition
Please see the watch window below. The variable isRecord is infact "True" but it wont evaluate to True
Watch : : isRecord : True : Boolean : Module1.LOVUpdate
Thanks,
Raghav
I have an "If" condition that if its evaluated to "True', execute something anf if it doesn't do something else but even though the if condition is True it always goes to Else condition
Code:
SareUSure = MsgBox("Do you want to start loading LOV?", vbYesNo)
If SareUSure = vbYes Then
Set oSiebelApp = CreateObject("TWSiebel.SiebelWebApplication.1")
Set oLOVBO = oSiebelApp.GetBusObject("List Of Values")
Set oLOVBC = oLOVBO.GetBusComp("List Of Values")
Set vWorksheet = ThisWorkbook.Worksheets("LoadLOV")
Set vObject = vWorksheet.[A2]
While Trim(vObject.Offset(RowCount, 0).Value) <> ""
' oLOVBC.ActivateField ("Type")
'oLOVBC.ActivateField ("Order By")
oLOVBC.SetViewMode AllView
oLOVBC.ClearToQuery
oLOVBC.SetSearchSpec "Type", "'" + Trim(vObject.Offset(RowCount, 0).Value) + "'"
oLOVBC.SetSortSpec "DESC"
oLOVBC.ExecuteQuery ForwardBackward
isRecord = oLOVBC.FirstRecord
If isRecord = True Then
iLastOrderBy = oLOVBC.GetFieldValue("Order By")
Else
GoTo CreateNewLOV
End If
Please see the watch window below. The variable isRecord is infact "True" but it wont evaluate to True
Watch : : isRecord : True : Boolean : Module1.LOVUpdate
Thanks,
Raghav