Results 1 to 3 of 3

File equals cell value problem

Threaded View

Dean81 File equals cell value problem 01-09-2012, 12:10 PM
snb Re: File equals cell value... 01-09-2012, 12:51 PM
Dean81 Re: File equals cell value... 01-11-2012, 06:07 AM
  1. #1
    Registered User
    Join Date
    09-20-2011
    Location
    Belfast
    MS-Off Ver
    Excel 2007
    Posts
    34

    File equals cell value problem

    Hello All,

    I am trying to use a macro to import all file names in a folder. I found the following which works perfectly:

    Dim ws As Worksheet
    
    Set ws = ActiveSheet
    Filename = Dir("C:\Dean\Dictation\*.mp3")
    
    Do Until Filename = ""
    ws.Range("A65000").End(xlUp).Offset(1, 0).Value = Filename
    Filename = Dir
    Loop
    End Sub
    The problem is I want the file path to be what is in cell V1, I tried

    Filename = Dir (Range("V1").Value)
    But this didn't work, I thought I was in the right area with that one but, after trying various versions of it I have gotten nowhere!

    Any advice would be most greatfully received!

    Thanks,

    Dean
    Last edited by Dean81; 01-12-2012 at 05:08 AM. Reason: Solved

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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