如何将工作簿设置为 fpath 和 listboxvalue
How do I set workbook as fpath & listboxvalue
Encounter Runtime Error 424, Object Required
下面的代码
Public fpath as string, fwbk As Workbook
Private Sub BtnCloseWoSaving_Click()
'Error on code below
Set fwbk = fpath & Me.ListBoxWbk.Value
End Sub
我正在使用用户表单打开文件、关闭和自动化数据。
停留在将打开的文件设置为工作簿的这个阶段。
提前感谢您的帮助(:
Public fpath as string, fwbk As Workbook
Private Sub BtnCloseWoSaving_Click()
'Error on code below
Set fwbk = workbooks.open(fpath & Me.ListBoxWbk.Value )
' ...
End Sub
Encounter Runtime Error 424, Object Required
下面的代码
Public fpath as string, fwbk As Workbook
Private Sub BtnCloseWoSaving_Click()
'Error on code below
Set fwbk = fpath & Me.ListBoxWbk.Value
End Sub
我正在使用用户表单打开文件、关闭和自动化数据。 停留在将打开的文件设置为工作簿的这个阶段。
提前感谢您的帮助(:
Public fpath as string, fwbk As Workbook
Private Sub BtnCloseWoSaving_Click()
'Error on code below
Set fwbk = workbooks.open(fpath & Me.ListBoxWbk.Value )
' ...
End Sub