The reasoning behind the Add-in
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.
Installation
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.
Working with the Add-in
The Line Swap add-in allows you to swap the code on either side of the = sign. Simply select the lines you want swapped and select the Add-Ins | Line Swap menu option. The selected code will be swapped.
For instance, when you select and Line Swap code like this:
strAppName = MyObject.AppName
you'll get code like this
MyObject.AppName = strAppName