|Line Swap Add-In||
|NT, 9x, 2k, XP
Have you ever encountered a situation where you have to copy all the members of one structure to another and then back. Code like this:
Load frmAppOptions With frmAppOptions .DefaultAniFormat = mPrefs.DefaultAniFormat .MaximumCalls = mPrefs.MaximumCalls .QuerySystemOnStartup = mPrefs.QuerySystemOnStartup .QueryOnControllerIdle = mPrefs.AniTimeout .EnableTimeSyncHours = mPrefs.EnableTimeSyncHours .Show vbModal If Not .Cancelled Then mPrefs.DefaultAliDmsSelection = .DefaultAliDmsSelection mPrefs.MaximumCalls = .MaximumCalls mPrefs.QuerySystemOnStartup = .QuerySystemOnStartup mPrefs.AniTimeout = .QueryOnControllerIdle mPrefs.EnableTimeSyncHours = .EnableTimeSyncHours End If End With
Essentially, what is happening you are populating the properties of one object with data and then you read the properties back into the original object. That's a time consuming task. I don't want to waste my time typing, thus this Add-In.
In order to start working with this add-in, you need to register it. There are two ways to accomplish this. You can load the Visual Basic project and re-compile it (overwriting the original Line Swap Addin.dll file). You can also open a command window and navigate to the folder containing the supplied Line Swap Addin.dll file and type the following:
regsvr32 "Line Swap Addin.dll"
This will enter the ActiveX DLL's information into the registry. The next time you load Visual Basic you should see its menu option in the Add-Ins menu.
strAppName = MyObject.AppNameyou'll get code like this
MyObject.AppName = strAppName