VarString$ = "FF 01 01"
That is what you are doing wrong. You are sending the ASCCI character string
FF<space>01<space>01
instead of the actual hex (i.e. 8-bit) bytes
FF0101
.
You need to use the VBA HEX function to get the correct values, something like:
Put #COMPort, , HEX(255) # FF
Put #COMPort, , HEX(1) # 01
Put #COMPort, , HEX(1)
[edit]
I think I may have misread the documentation, you can send the hex characters directly by:
Put #COMPort, , &HFF
Put #COMPort, , &H01
Put #COMPort, , &H01
[/edit]
And as an aside, if you don't understand some code that you download from "somewhere", then be aware that it could do all sorts of damage to your system.