Results 1 to 6 of 6

Processing Multiple Files

Threaded View

  1. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Processing Multiple Files

    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
    Last edited by Kyle123; 09-13-2011 at 04:47 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1