+ Reply to Thread
Results 1 to 4 of 4

open all workbooks not working

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    open all workbooks not working

    Hello. This code exits out even if I select a folder. Why?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: open all workbooks not working

    Try something like this...
    MyFile = Dir(MyFolder & "*.*")

    Or this if you want a specific file extension
    MyFile = Dir(MyFolder & "*.xls")
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: open all workbooks not working

    Why do I need to add the "*_*" ?

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: open all workbooks not working

    "*.*" is the wildcard for finding all the files in a folder

    TIP: In your VBA code, highlight the term Dir and press F1 for an help on the function.

+ 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. [SOLVED] Dir () , Workbooks.Open stopped working
    By vlookup. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-28-2015, 05:25 PM
  2. [SOLVED] workbooks.open not working in xl2010 but works in xs2003
    By symaxf in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2013, 11:35 PM
  3. Defining workbook variable not working with workbooks.open
    By hmbugg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2013, 02:09 PM
  4. [SOLVED] Open Multiple Workbooks, Record names, Copy paste to Active Workbook, Close the Workbooks
    By vba_madness in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2013, 06:09 AM
  5. Macro to close all open workbooks save two not working
    By drajanm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2011, 05:58 AM
  6. Private Sub Worksheet_Change stops working when I have certain workbooks open.
    By forth250 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-12-2008, 03:47 PM
  7. [SOLVED] Problem with Macro working in new workbooks that I open
    By chris_rip in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-29-2005, 03:06 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