Private Sub Command1_Click() Dim xlApp As Object '定义存放引用对象的变量。
Set xlApp = CreateObject("excel.application")
xlApp.Visible = True Set objWorkBook = xlApp.Workbooks.Open("C:\STUdent.xls")'xlApp.Quit '完成时,调用 Quit 方法关闭 'Set xlApp = Nothing '该应用程序,然后释放该引用。 End Sub Private Sub Form_Load() Command1.Caption = "N" End Sub
什么样的?
EXCEL表格...
Dim xlApp As Object '定义存放引用对象的变量。
Set xlApp = CreateObject("excel.application")
xlApp.Visible = True
Set objWorkBook = xlApp.Workbooks.Open("C:\STUdent.xls")'xlApp.Quit '完成时,调用 Quit 方法关闭
'Set xlApp = Nothing '该应用程序,然后释放该引用。
End Sub
Private Sub Form_Load()
Command1.Caption = "N"
End Sub
如果是ACCESS数据库的表呢...