View Single Post
  #1 (permalink)  
Old July 30th, 2007, 05:44 PM
deco deco is offline
Registered User
 
Join Date: Apr 2007
Location: , , Libya.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to deco
Default runtime automation error library not registered

I try to list the contents of folder by using the FileSystemObject Library the
run-time error '-2147319779(8002801d)'; automation error library not registered
is appears buti use the same application in another computer and its run
i check the reference microsoft scripting runtime
the code
Code:
Dim FSO As New FileSystemObject
Dim FileInFolder As Files
Dim FileName As File
Dim I As Integer
Dim FolderInPath As String
Private Sub Command1_Click()

    Set FileInFolder = FSO.GetFolder("C:\Program Files\NowSMS\SMS-IN").Files

    For Each FileName In FileInFolder
        List1.AddItem FileName
        DoEvents
    Next
 
    For I = 0 To List1.ListCount - 1
          FolderInPath = Replace(List1.List(I), "C:\Program Files\NowSMS\SMS-IN\", App.Path & "\CopyOf(SMS-IN)\" & "(" & I & ")")
          FSO.CopyFile List1.List(I), FolderInPath, False
    Next I

End Sub
deco
Reply With Quote