keith我正在努力解决这个问题,但出现了错误。私有函数行高亮显示,它一直高亮显示x,所以我想我可以将所有发生的事情都更改为getfiles,但现在它高亮显示了rVal。我搞砸了什么
- 'Display an open dialog, adds selected files to an array
- Private Function GetFiles() As Variant
- 'Stores the object created by the CommonDialog class
- Dim myOpen As CommonDialogProject.CommonDialog
- Set myOpen = CommonDialogProject.Init 'Create the object
-
- myOpen.DialogTitle = "Select drawings" 'Change the title
- myOpen.Filter = "AutoCAD Drawing files (*.dwg)|*.dwg|" & _
- "AutoCAD Drawing template files (*.dwt)|*.dwt"
- myOpen.DefaultExt = "dwg"
- 'Set flags to limit behavior of the dialog box
- myOpen.Flags = OFN_ALLOWMULTISELECT + _
- OFN_EXPLORER + _
- OFN_FILEMUSTEXIST + _
- OFN_HIDEREADONLY + _
- OFN_PATHMUSTEXIST
- For GetFiles = 67 To 69
- rVal = Dir(Chr(GetFiles) & ":\Drawings")
- If rVal "" Then
- GetFiles = 70
- End If
- Next GetFiles
|