I am trying to pass information from vba to autocad using the acad.cfg file.

I use the following syntax:

Dim zzGetVarzz as String

ThisDrawing.SendCommand "(setvar ""USERS1"" (getcfg ""AppData/SDTOPO/StringForTitle""))" & vbCr

zzGetVarzz = AutoCAD.Application.ActiveDocument.GetVariable("US ERS1")

This works OK only if i use it one or two times within the Sub.
I need to call this syntax over 80 times within the same Sub and when i run it it seems command line gets confused (synchronising issues) with so many commands and does not work rigth.

If anyone could give an example of how to use "Autocad.Application.Prefernces.property property"
which is the comparision of getcfg in vba (whithout using sendcommand).

Thank you in advance.
Please help