excel.txt

来自「在VB中实现通讯的例子」· 文本 代码 · 共 36 行

TXT
36
字号
*** How To Build EXCEL Example Program ***

This test file will describe the steps necessary for building an EXCEL
spreadsheet which accesses the serial port.

 (1) Start EXCEL.
 (2) Choose INSERT, the MACROS, then MODULE.
 (3) Choose INSERT, FILE, and then select WSC16.BAS (or WSC32.BAS) from the
     WSC4VB archive.
 (4) Move the cursor to the bottom of the file.
 (5) Choose INSERT, FILE, and then select MODULE.BAS.
 (6) Change the port (specified in MODULE.BAS) if necessary.
 (7) Tab back to sheet 1.
 (8) Move to cell A1, double click, then type  =OpenPort()
 (9) Move to cell A2, double click, then type  =PutByte(B2)
(10) Move to cell B2, double click, then type  13 (carriage return)
(11) Move to cell A3, double click, then type  =GetByte()
(12) Move to cell A4, double click, then type  =ClosePort()
(13) Save the completed spreadsheet as EXCEL16.XLS or EXCEL32.XLS.
(14) Test the spreadsheet.
     [a] Open the serial port by executing cell A1. The Shareware Banner should
         appear, and a value of 0 returned.
     [b] Send a byte to the serial port by putting their ascii value (65 for
         "A", etc.) in cell B2, and executing cell A2.
     [c] Read bytes from the serial port by executing cell A3.
     [d] Close the port by executing cell A4.









 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?