Open up the VB Editor (Alt+F11 in Windows or Tools->Macros->Visual Basic Editor on Mac)
Double-click on the Sheet1 object and paste the following code:
Option Explicit
Public Sub Worksheet_Change(ByVal target As Range)
Debug.Print "Something changed in cell " & target.Address(0, 0)
Assign this to your message to send out to comport in within this
End Sub
This is a very basic example of how to start using the Worksheet_Change event. This method is what’s called an Event Handler, which simply means that “this is the method I want to use for handling when X event happens.”
Whenever a cell changes as we described above, Excel will execute the Worksheet_Change event and pass in the cells that were changed through the target object. We use this target object to take a look at which cells were affected.
To invoke this event, go to the Sheet1 worksheet and make a change to a cell. Then, in the VBE Immediate Window (Ctrl+G on Windows or in Mac this window should always be visible) you will see some text appear each time the event is fired.
For using comports I suggest reading these two links You would need to attach peripheral hardware that is capable of driving your lamp via an Arduino via serial port connection or FTDI device and relative code for decoding your serial port bytes sent
Here are tow such links for you to read up on using api calls
http://www.vbaexpress.com/forum/showthread.php?60184-Using-COM-port-with-Excel-VBA
http://www.thescarms.com/vbasic/commio.aspx
Hope this assist you and best of luck with what you are doing