Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-19-2012, 10:22 PM
gsrikanth gsrikanth is offline FileSystemObject Compile Error: User-Defined Type Not Defined Windows XP FileSystemObject Compile Error: User-Defined Type Not Defined Office XP
Competent Performer
FileSystemObject Compile Error: User-Defined Type Not Defined
 
Join Date: Dec 2011
Posts: 133
gsrikanth is on a distinguished road
Default FileSystemObject Compile Error: User-Defined Type Not Defined


Code:
Dim FSO As New FileSystemObject


Private Sub Command1_Click()

  Dim fld As Folder
  Dim flds As Folders
  Dim fl As File

  With FSO
    
      Set fld = .GetFolder("D:\Projects Others\TZ-HASAN\WEB\images_upload")
      Dim f
      
      'MsgBox fld.Files.Count
      
      For Each fl In fld.Files
      
        If Right(fl.Name, 3) = "img" Then
          
          fl.Name = Left(fl.Name, Len(fl.Name) - 3) & "gif"
          
        End If
      
      Next
  
  End With
  

End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
FileSystemObject Compile Error: User-Defined Type Not Defined Application-defined or Object-defined error Manit Excel Programming 4 12-08-2011 07:35 PM
Edit Multiple Emails' User-Defined Field ryancaseymcshane Outlook 0 10-04-2011 07:40 AM
Compile error: sub or function not defined.. xena2305 Excel Programming 0 08-02-2011 10:17 AM
FileSystemObject Compile Error: User-Defined Type Not Defined Why unable to use underscore in microsoft word styles( user defined)? noufalcm Word 1 03-08-2011 01:46 PM
FileSystemObject Compile Error: User-Defined Type Not Defined User Defined Default Settings in Insert J_oe Word 1 02-17-2011 10:55 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:03 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft