如何修复此错误“用户定义的类型未定义”?

时间:2014-12-01 01:09:29

标签: excel vba

VBA代码中的问题不是Excel中的问题,因为当我将代码复制到另一个Excel工作时。

Private Sub CommandButton1_Click() 
Dim MyFolder As FileDialog 
Set MyFolder = Application.FileDialog(msoFileDialogFolderPicker) 
MyFolder.AllowMultiSelect = False 
MyFolder.Show 
Sheet2.Range("K6") = MyFolder.SelectedItems(1)"\" TextBox1 = MyFolder.SelectedItems(1)&"\" 
Set diaFolder = Nothing 
End Sub

0 个答案:

没有答案