running a macro using Excel for Office 365 (64bit) on Win10. All Trust settings adjusted accordingly.
Attachment shows module code.
On the form I have a button to run code:
lngStatus=CommOpen(gCOMPort, "COM" & Cstr(gCOMPort),_
("baud=9600 parity=Even data=8 stop=1")
'The port opens OK.
lngStatus=CommWrite(gCOMPort, "X/C" & CRLF)
Pause (2)
lngStatus=CommRead(gCOMPort, datastring, 7)
'Here's where things stop working. Result set does not return correct string. No errors-just not returning expected result.
What else I've tried.
Ran Realterm(serial capture program-sending same command "X/C" and other commands-results returned were correct.
Ran same Excel macro (removed PtrSafe from all Declare Function statements)on WinXP SP2 machine using Excel 2007-results returned were correct.
What I suspect (not validated yet)is Excel 32bit vs 64bit, but before I setup another machine I wanted to ask if any serial programmers
were aware of this issue or have a solution.
Attachment shows module code.
On the form I have a button to run code:
lngStatus=CommOpen(gCOMPort, "COM" & Cstr(gCOMPort),_
("baud=9600 parity=Even data=8 stop=1")
'The port opens OK.
lngStatus=CommWrite(gCOMPort, "X/C" & CRLF)
Pause (2)
lngStatus=CommRead(gCOMPort, datastring, 7)
'Here's where things stop working. Result set does not return correct string. No errors-just not returning expected result.
What else I've tried.
Ran Realterm(serial capture program-sending same command "X/C" and other commands-results returned were correct.
Ran same Excel macro (removed PtrSafe from all Declare Function statements)on WinXP SP2 machine using Excel 2007-results returned were correct.
What I suspect (not validated yet)is Excel 32bit vs 64bit, but before I setup another machine I wanted to ask if any serial programmers
were aware of this issue or have a solution.