Maybe:
Private Sub cmd_browseConfig_Click() ' code which choose config file
strchosenfile = Application.GetOpenFilename()
TextBox1.Value = strchosenfile
End Sub
Private Sub Cmd_browseFolder_Click() ' code which opens the Folder to be selected by user
Dim FName As String
FName = BrowseFolder(Caption:="Select A Folder")
If FName = vbNullString Then
Debug.Print "No Folder Selected"
Else
Debug.Print "Selected Folder: " & FName
End If
TextBox2.Value = FolderPart(FName) ' The FolderPath
strInputFile = TextBox2.Value
End Sub
Function FolderPart(sPath As String) As String
FolderPart = Left(sPath, InStrRev(sPath, "\"))
End Function
Sub Process()
' c00 = "E:\OF\" ' change the foldername if necessary ; always ending with \
' c01 = Dir(c00 & "*.xls") ' change the extension if necessary
Do Until c01 = ""
With GetObject(c00 & c01)
' change something
CreateWaferMap
.Close True
End With
c01 = Dir
Loop
End Sub
Bookmarks