One of the mysteries of life! In this utility … Document a universe using Excel and the Designer SDK … I wanted to include the LOV name. I ended up just skipping it, because simply “touching” the object at all causes it to refresh … maddening .
I am trying to get the SQL behind a LOV using VBA or at least show if it does not parse. i.e. find LOVs that have been edited and the box ticked for do not generate before running
I have tried the method above but it won’t catch the errors even if interactive is true
For Each Obj In DesClass.Objects
.Cells(lRow, 2).Value = Obj.Name
.Cells(lRow, 3).Value = Obj.Select: If checkErrors(Obj.Select) Then .Cells(lRow, 3).Font.Color = RGB(255, 0, 0): .Cells(lRow, 5) = ErrorList
.Cells(lRow, 4).Value = Obj.Where: If checkErrors(Obj.Where) Then .Cells(lRow, 4).Font.Color = RGB(255, 0, 0): .Cells(lRow, 5) = .Cells(lRow, 5) & " " & ErrorList
On Error GoTo LOVerror
.Cells(lRow, 6).Value = Obj.ListOfValues.Name
Obj.ListOfValues.Refresh
GoTo LOVerrorskip
LOVerror:
.Cells(lRow, 7).Value = .Cells(lRow, 7).Value & " --CHECK SQL"
Resume LOVerrorskip
LOVerrorskip:
On Error Resume Next
lRow = lRow + 1
Next Obj
(checkerrors is a function looking for certain characters)