内蒙特产有哪些好吃的:急!!一个VB问题:如何用工具栏打开word,excel,powerpoint

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 06:47:37
我已做了工具栏,但代码不会写
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "word"
。。。。
Case "excel"
。。。。
Case "powerpoint"
。。。。
End Select
End Sub
省略号处应该怎么写?
或者有什么方法?

Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long
Private Sub Command1_Click()
CommonDialog1.ShowOpen
WinExec CommonDialog1.FileName, 9 '10为默认,3为最大,6为最小,9为普通
End Sub
这是我练习时候的代码有声明的(刚才忘了)