Topic
  • 1 reply
  • Latest Post - ‏2014-05-12T02:01:38Z by jburke
maxcomde
maxcomde
1 Post

Pinned topic SA Macro VBA Error 91 when Attribute contains . (dot)

‏2012-10-11T11:16:28Z |
Hello,
I am experiencing a strange behavior in a VBA Macro.
The Macro will list all Locations and by selecting an Entry from this list, the Name of the selected Location will be used for later processing.
The Macro works perfectly as long as there is no dot '.' in Location.Name .
e.g.

"Zone bmtintra" is working
but
"Zone bmtintra.de" fails with Runtime error 91 Object variable or with block variable not set.

Here is the code segment:

Private Sub OKButton_Click()
z = 0
'we will prepare a list of all location entries
For i = 0 To ListBox1.ListCount - 1 'Count all elements
'by selecting an element, the entry in locations is determined

If ListBox1.Selected(i) = True Then
defName = ListBox1.List(i, 0)
Set defs = Encyclopedia.GetFilteredDefinitions(defName, 310)
Call defs.ReadAll
Set selLocation = defs(1)
MsgBox """" & defs(1).GetProperty("Name") & """"
Debug.Print defs(1).name
LocationName = defs(1).name
MsgBox "Lokation " & LocationName & " gefunden. "
z = z + 1
End If
Next i

Can someone give any advise how I can overcome this strange behavior.
Rgds,
Thomas
  • jburke
    jburke
    3 Posts

    Re: SA Macro VBA Error 91 when Attribute contains . (dot)

    ‏2014-05-12T02:01:38Z  

    Hi Thomas

    It is possible there are corrupted files in the user profile folder.
    Please try the following steps to solve this issue:
     
    1) Backup and delete the System Architect from the user profile folder
        located here:
             Windows xp:   C:\Documents and Settings\<user-name>\\Local
    Settings\Application Data\Telelogic\System Architect
            Windows 7:  C:\Users\<user-name>\AppData\Local\Telelogic\System
    Architect
     
    2) Run the following executable as Administrator on your machine:
      C:\Program Files\IBM\Rational\System Architect Suite\System
    Architect\Support\SAReg.exe
     
    Running this executable will re-register all the required DLLs with the
    operating system.

    Thanks

    Jim