第1个回答 2018-04-25
下面是程序,你在界面添加一个输入框就行了
Y = 1
Event Form1.InputBox1.Change
Form1.InputBox1.Text = Left(Form1.InputBox1.Text,5)
End Event
Call Plugin.Office.OpenXls("C:\Users\huangwei\Desktop\新建 Microsoft Excel 工作表.xlsx")
If Form1.InputBox1.Text = "" Then
MsgBox "请输入行数"
Else
For i = 0 To 1
Text = Plugin.Office.ReadXls(1, Form1.InputBox1.Text, Y)
//MessageBox "读出内容为:" & Text
SayString Text
Delay 100
KeyPress "Tab", 1
Delay 100
Y = Y + 1
Next
End If
Call Plugin.Office.CloseXls()本回答被网友采纳