EXCEL VBA获取Const文件夹
我有一个代码“copyMultFiles”将许多文件中的许多值移动到单个文件 我的问题是不能在“Const”中使用参数 错误此行“Const csMyPath As String = vaFiles1” vaFiles1是获取源文件夹我无法在csMypath中输入 'get source folder Dim diaFolder As FileDialog Dim vaFiles1 As String ' Open the file dialog Set diaFolder = Application.FileDialog(msoFileDialogFolderPicker) diaFolder.AllowMultiSelect = False diaFolder.Show 'MsgBox diaFolder.SelectedItems(1) vaFiles1 = diaFolder.SelectedItems(1) ' change these to suit requirements Const csMyPath As String = vaFiles1 …