|
Sub OpenWorkbook()
Dim WorkbookPath As String
Dim WorkbookName As String
Dim Workbook As Workbook
'提示用户输入工作簿路径和工作簿名称
WorkbookPath = InputBox("请输入工作簿路径:", "打开工作簿")
WorkbookName = InputBox("请输入工作簿名称:", "打开工作簿")
'打开工作簿
Set Workbook = Workbooks.Open(WorkbookPath & "\" & WorkbookName)
End Sub |
|