VBA Module Installation
-
Download COM_PORT_ENUM_SETTINGS.bas to a known location on your PC
-
Open a new Excel document
-
Enter the VBA Environment (Alt-F11)
-
From VBA Environment, view the Project Explorer (Control-R)
-
From Project Explorer, right-hand click and select Import File
-
Import the file COM_PORT_ENUM_SETTINGS.bas
-
Check that a new module
COM_PORT_ENUM_SETTINGS
is created and visible in the Modules folder -
VBA6 only - delete
PtrSafe
keyword in function definition -
Close and return to Excel (Alt-Q)
-
IMPORTANT - save document as type Macro-Enabled with a file name of your choice
Ribbon Customisation
The Office RibbonX Editor is recommended for Ribbon customisation.
Download and install RibbonX following the instructions provided with it.
Download the file RIBBON.xml
in preparation for use.
Follow the instructions to install the RIBBON.xml
customisation file.
Select COM Port
The text Select Com Port is clickable.
- Clicking it will perform another com port scan and update the drop-down box below it.
- Text will change to Detect Com Port if no ports are available.
- Mouse hovering over it will show a 'Supertip' message with the :-
- number of Com ports available
- last port scan date and time
Com ports are not opened and do not need to be free during a port scan.
COM Port Drop-Down
- The drop-down is populated when initially opening the Workbook, or by clicking the button above it.
- Selecting a drop-down item will refresh the Com Port Settings icon on the right.
COM Port Settings
- Clicking the icon will start the Windows Com Port Config dialogue window.
- New settings can be selected in the dialogue window in preparation for change.
- The selected COM port needs to be opened briefly to apply the changes.
- A confirmation message box appears prior to opening the port and changing settings.
DLL Errors
DLL Errors may be returned if the port is unavailable or the settings cannot be applied to it.
If COM ports have been added, removed or renumbered, click "Select Com Port" to perform a new port scan.
Note that some port types (e.g. software virtual com ports) may not support any settings changes from default.