Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 21st, 2012, 09:13 AM
Authorized User
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default Read ony Excel files

Hi,

I have a folder or directory, which has many excel files as well as pdf ones.

I wish to run a procedure that would open and read the data of only Excel files and skip the pdf one.

I can use "On Error Resume Next" but this slows the process because VBA still open pdf. As an alternative I wrote this: Dir(FilePath & "\*.xls*") but VBA ignored or skipped all files, I think, because the extension is hidden.

Can someone please advise how to deal with this?

Thanks
 
Old July 2nd, 2012, 03:17 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi Khalil

Can you please try this

http://vbadud.blogspot.in/2006/12/di...ual-basic.html

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Read-Only Files in VBA Ross66 Excel VBA 3 April 28th, 2012 05:30 AM
creating read-only files Fat_and_immoral Excel VBA 4 December 20th, 2006 09:24 AM
Writing Files that can't be read Ron_Bingham BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 April 23rd, 2005 02:25 PM
How to read multiple text files into excel? Together Excel VBA 4 March 5th, 2004 06:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.