Dinesh Santhalingam

Dinesh Santhalingam

  • NA
  • 737
  • 368.7k

I want some Extension of file from a selected folder in VBA?

May 8 2017 1:04 AM
  1. Set objFSO = CreateObject("Scripting.FileSystemObject")  
  2. Set objFolder = objFSO.GetFolder("D:\testing folder")  
  3.   
  4. For Each objFile In objFolder.Files  
  5.  MsgBox Cstr(objFile)  
  6. Next  
In my folder there are so much files but i want only excel files in that folder .Please suggest some idea to solve the problem.

Answers (2)