新建From1(窗体),新建Command1(按钮CommandButton),代码:
Private Sub Command1_Click() Dim b(2) As Byte b(0) = 11 b(1) = &HFF b(2) = Oct(9) MsgBox b(0) & " " & b(1) & " " & b(2) End Sub
运行结果:
11 255 11