+ Reply to Thread
Results 1 to 9 of 9

Open specific folder, select file to open and copy then paste

Hybrid View

  1. #1
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: Open specific folder, select file to open and copy then paste

    Kranky

    Can you post what you've tried so far?

    Did you try Application.GetOpenFilename?

    Dim wb As Workbook
    Dim strDrive As String
    Dim strFolder As String
    Dim strFilename As String
    
        strDrive = "C:"
    
        strFolder = "C:\ASpecificFolder"
    
        ChDrive strDrive
    
        ChDir strFolder
    
        strFilename = Application.GetOpenFilename("Excel Files (*.xls), *.xls")
    
        If strFilename <> "False" Then
            Set wb = Workbooks.Open(strFilename)
    
            ' code to copy and paste to other workbook
    
            wb.Close
    
        End If
    If posting code please use code tags, see here.

  2. #2
    Registered User
    Join Date
    09-24-2012
    Location
    Perth, WA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Open specific folder, select file to open and copy then paste

    Thanks Norrie

    No I can't post what I've tried because I dumped it all in frustration. had tried many permutations of code off the net but it seems noone wants to do this specific task as i couldn't get a hit with it. One of them had Application.GetOpenFilename in there somewhere.

    Will give your code a run shortly.

    cheers
    Kranky

+ Reply to Thread

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