+ Reply to Thread
Results 1 to 3 of 3

Change 'as file' object to a specific type

  1. #1
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Durham
    MS-Off Ver
    2013
    Posts
    126

    Change 'as file' object to a specific type

    Hi guys,

    Is there a way to define the
    Please Login or Register  to view this content.
    object to a specific file i.e. *.xlsm

    At the moment I have code that searches through folders for files, counts them etc

    But I want the file to be Excel only.

    The main line is:

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Change 'as file' object to a specific type

    I think you'll have to loop through the filenames and test like this:

    Please Login or Register  to view this content.
    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 05-22-2017 at 02:18 PM.

  3. #3
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Durham
    MS-Off Ver
    2013
    Posts
    126

    Re: Change 'as file' object to a specific type

    Never thought about doing it that way - works like a charm, thank you

+ 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] VBA Determine Object Type (From HTML DOM Object) Put Type in String variable (as shown in
    By Doc.AElstein in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-28-2016, 11:49 AM
  2. VBA Open Specific File Type
    By hobbiton73 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-03-2015, 03:50 AM
  3. Replies: 0
    Last Post: 06-19-2014, 02:09 PM
  4. Save as - With specific file type
    By gnaske in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-05-2013, 12:45 PM
  5. change type of a file
    By ditzafar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2006, 04:02 PM
  6. change type of a file
    By ditzafar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2006, 06:56 AM
  7. How to select a specific file type
    By MervB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2005, 04:10 AM

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