Results 1 to 7 of 7

open file with cell value as filename

Threaded View

nigelog open file with cell value as... 12-05-2014, 07:09 AM
AlanY Re: open file with cell value... 12-05-2014, 07:16 AM
nigelog Re: open file with cell value... 12-05-2014, 07:34 AM
nigelog Re: open file with cell value... 12-05-2014, 08:38 AM
nigelog Re: open file with cell value... 12-05-2014, 08:49 AM
AlanY Re: open file with cell value... 12-05-2014, 08:41 AM
Norie Re: open file with cell value... 12-05-2014, 08:42 AM
  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    open file with cell value as filename

    I have been trying to adapt this code to open another workbook (to populate a table) using the entry in "A3" as the filename. Tells me file cannot be found. What am I overlooking. File is in same directory

    Sub GetData()
    
    
    
     Dim varCellvalue As String
    
     varCellvalue = Range("a3").Value
    
     Workbooks.Open ("p:/My Documents/Driver Database/" & varCellvalue & ".xlsm")
     End Sub

    Name of actual file required is "14 Driver Assessment wk44"

    Any help Appreciated

    text content of "A3" is "14 Driver Assessment wk44"
    Any help appreciated
    Last edited by nigelog; 12-05-2014 at 08:50 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Using Workbook.Open Filename to Open a Cell Reference Filename
    By PerplexedMel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-10-2014, 12:20 PM
  2. Open a file with varying filename
    By gototcm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2014, 11:24 AM
  3. Replies: 4
    Last Post: 10-23-2013, 12:54 AM
  4. Macro: Open file but the filename changes
    By FLani in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2013, 06:36 AM
  5. [SOLVED] Macro to read filename in cell and open new file
    By April in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2005, 10:05 AM

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