VB打开EXCEL文件,让EXCEL文件显示在最前面,且最大化。这样的VB代码如何编写。
展开全部
sub openwksht
Dim xlapp As Excel.Application
Dim xlbook As Excel.Workbook
Set xlapp = CreateObject("excel.application")
Set xlbook = xlapp.Workbooks.Open("你要打开的文件路径和文件名 ")
xlapp.Visible = True
xlapp.WindowState = xlMaximized
xlbook.activate
End Sub
Dim xlapp As Excel.Application
Dim xlbook As Excel.Workbook
Set xlapp = CreateObject("excel.application")
Set xlbook = xlapp.Workbooks.Open("你要打开的文件路径和文件名 ")
xlapp.Visible = True
xlapp.WindowState = xlMaximized
xlbook.activate
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询