+ Reply to Thread
Results 1 to 12 of 12

Workbook.open a filename with path and cell value in it

Hybrid View

  1. #1
    Registered User
    Join Date
    06-11-2010
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: Workbook.open a filename with path and cell value in it

    Complete script is:
    Sub IMPORTEXAMPLE()
    '
    ' IMPORTEXAMPLE Macro
    '
    '
        Sheets("DATA").Select
        Workbooks.Open FileName:="O:\Splitsen\TEST.xlsx"
        Cells.Select
        Selection.Copy
        Windows("SPLITSEN_v1.0g.xlsm").Activate
        Cells.Select
        ActiveSheet.Paste
        Sheets("HS lijst").Select
        Range("C4").Select
        Windows("TEST.xlsx").Activate
        Application.CutCopyMode = False
        ActiveWindow.Close
        Application.CutCopyMode = True
        Windows("SPLITSEN_v1.0g.xlsm").Activate
    End Sub
    The two lines in red have the text "TEST" stated but I want to change those to the text selected in cell J2.

    @Norie sheet name and file name are is marked blue above.
    Last edited by dutchmaste; 06-16-2016 at 08:10 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find filename and path of a linked file in another cell
    By Tsangman007 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-02-2015, 01:35 AM
  2. Value from another open workbook in filename
    By biznez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-23-2015, 03:40 PM
  3. 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
  4. [SOLVED] Save a workbook to a folder path in textbox2 using textbox1 as filename
    By yoko21 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-24-2013, 03:59 AM
  5. Replies: 3
    Last Post: 07-09-2012, 03:09 PM
  6. Find filename, path, document size, filename length and path length?
    By Laneyboggs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2010, 08:01 PM
  7. Use cell in open workbook to id path to wanted data
    By NickiName in forum Excel General
    Replies: 3
    Last Post: 05-10-2007, 02:04 PM

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