Results 1 to 5 of 5

Thread: VBA To Close Workbook Based On Cell Value Change And Open New Workbook

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member
    Join Date
    Apr 2014
    Posts
    45
    Rep Power
    0
    possible to change this line to a range where I list all the WB names in, Range(“E1:E150”)

    Code:
       For Each var In Array("Doc_01.xls", "Doc_02.xls", "Doc_03.xls", "Doc_04.xls", "Doc_05.xls")
    and
    Sheet1("B2") = C:\My Docs\
    Sheet1("C2") = DataWB.xls

    how to change the


    Code:
    Case "Doc_01.xls", "Doc_02.xls", "Doc_03.xls", "Doc_04.xls", "Doc_05.xls"
    into something simple like, as i may have 100+ data WB,

    Code:
    Case "Sheets("Sheet1").Range("C2").Value": Open Doc
    Last edited by mrprofit; 04-10-2014 at 08:46 PM.

Similar Threads

  1. Replies: 6
    Last Post: 09-07-2013, 03:40 PM
  2. Replies: 6
    Last Post: 08-25-2013, 12:35 PM
  3. VBA Code to Open Workbook and copy data
    By Howardc in forum Excel Help
    Replies: 16
    Last Post: 08-15-2012, 06:58 PM
  4. Replies: 2
    Last Post: 12-12-2011, 01:51 PM
  5. Timer to close excel workbook
    By leopaulc in forum Excel Help
    Replies: 5
    Last Post: 10-24-2011, 12:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •