LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default how to open all hidden .xls files

I have some code to open all excel files in a folder, but it will only open
the files that are not hidden. Is there a way to open all the files
regardless of hidden status.

Here is the code.

Sub open_all_files()
Dim path As Variant
Dim excelfile As Variant
path = "c:/users/caleb/documents/commissions experiment/"

excelfile = Dir(path & "*.xls")
Do While excelfile < ""
Workbooks.Open Filename:=path & excelfile
excelfile = Dir
Loop
End Sub

Thanks
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I toggle between 2 open excel files and leave both open Big D in Brighton Excel Discussion (Misc queries) 1 November 6th 08 04:28 PM
How to change default Open/Files of Type to "Microsoft Excel Files Tammy Excel Discussion (Misc queries) 2 January 14th 08 11:06 PM
hidden macro affects how other files open [email protected] Excel Discussion (Misc queries) 0 January 9th 08 04:00 PM
how do I open a hidden column? JP Excel Worksheet Functions 4 September 13th 06 03:33 AM
file open via IE hyperlink causes already open files to shrink and tile Marc Setting up and Configuration of Excel 0 May 4th 05 08:13 PM


All times are GMT +1. The time now is 04:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"