Results 1 to 2 of 2

Browse files for compilation

Threaded View

  1. #1
    Registered User
    Join Date
    12-02-2010
    Location
    Singapore, Singapore
    MS-Off Ver
    Excel 2007
    Posts
    12

    Browse files for compilation

    Hi all,

    I am currently have an idea that requires the use of macros (especially userform)

    The overview of how the macro will run is as the following:
    1. A Userform box will apepar upon running the macro (see attachment 1)
    2. The user will then be able to browse out the relevant files that he/she wants to compile. We are talking about multiple files to be opened and then extracting & pooling together relevant data from each of these multiple files
    3. I want the Userform to display as well the specific path-name of the files being "browsed out". This should be sort of a list box being displayed in the empty space as shown in attachment 1.
    4. Upon "browsing out" all the requried file, the user will then click on the 'Compile' button and then the relevant data from each files will be compiled together.

    Currently, I figured out how the browse macro code should be. They are listed below

    Private Sub CommandButton1_Click()
    
    Dim TheFile As Variant
    Dim bk As Workbook
    
    TheFile = Application.GetOpenFilename("Excel files (*.xls), *.xls", , "Pick a file")
    
    If TheFile <> False Then
    Set bk = Workbooks.Open(TheFile)
    Else
    Exit Sub
    End If
    
    End Sub
    However, I am stuck in figuring out the macros code to generate the list box that will display the relevant files being browsed.

    Will appreciate fi anybody can help

    Thanks!
    Attached Images Attached Images

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