Solved

How can I Search a harddrive for files with specific extension

Posted on 2001-06-06
8
348 Views
Last Modified: 2007-11-27
I may be in over my head here, as prior experience limited to Word VBA stuff.  But am attempting to write a program that will allow me to search computer in a specific folder-like "my documents" (and the search would include all subfolders) for files with specific extensions.  Will need to look for .ppt, .doc, .jpg, and a few others.  The key would be to specify say, 5 or 6 extensions in the program, but have the user identify others (like with a text box).  Ideally, the results would be sent to a list box or a richtext box, and then I would be able to save that to a file.

THANKS in advance
0
Comment
Question by:phred_the_cat
8 Comments
 
LVL 18

Expert Comment

by:bobbit31
Comment Utility
Private Sub Command1_Click()
   Dim nDirs As Integer
   Dim nFiles As Integer
   
'' search for your different extensions here
   FindFile "C:\my documents\", "*.*", nDirs, nFiles
   
   MsgBox "Directories searched: " + Str(nDirs)
   MsgBox "Files Found: " + Str(nFiles)
   
End Sub


'' USE THIS FUNCTION TO FIND FILES IN FOLDER and SUBFOLDERS
     Private Function FindFile(ByVal sFol As String, sFile As String, _
       nDirs As Integer, nFiles As Integer) As Long
       Dim tFld As Folder, tFil As File, FileName As String
       Dim fso As New Scripting.FileSystemObject
       Dim fld As Folder
       
       Set fld = fso.GetFolder(sFol)
       FileName = Dir(fso.BuildPath(fld.Path, sFile), vbNormal Or _
         vbHidden Or vbSystem Or vbReadOnly)
         While Len(FileName) <> 0
           FindFile = FindFile + FileLen(fso.BuildPath(fld.Path, _
                      FileName))
           nFiles = nFiles + 1
           MsgBox FileName  ' this is where your code goes
           FileName = Dir()  ' Get next file
              DoEvents
           Wend
     
      nDirs = nDirs + 1
      If fld.SubFolders.Count > 0 Then
           For Each tFld In fld.SubFolders
              DoEvents
              FindFile = FindFile + FindFile(tFld.Path, sFile, nDirs, _
                         nFiles)
           Next
      End If
     End Function

be sure to reference microsoft scripting runtime under project/references

good luck
0
 
LVL 6

Expert Comment

by:JonFish85
Comment Utility
0
 
LVL 3

Expert Comment

by:jrspano
Comment Utility
here is a file system wrapper class desingned by Matt Hood I found on the web and have use before


Option Explicit

'*****************************************************************************************
'FileSystemObject Wrapper Functions & OS Version Information
'Dependencies: Windows Scripting Runtime Library (scrrun.dll)
'Author(s): Matthew Hood Email: DragonWeyrDev@Yahoo.com / Unknow - www.planetsourcecode.com
'*****************************************************************************************
'*****************************************************************************************

'*****************************************************************************************
'Class Constants
'*****************************************************************************************
Private Const MAX_PATH = 260
Private Const INVALID_HANDLE_VALUE = -1
Private Const FILE_ATTRIBUTE_DIRECTORY = &H10
Private Const FILE_ATTRIBUTE_ARCHIVE = &H20
Private Const FILE_ATTRIBUTE_COMPRESSED = &H800
Private Const FILE_ATTRIBUTE_HIDDEN = &H2
Private Const FILE_ATTRIBUTE_NORMAL = &H80
Private Const FILE_ATTRIBUTE_READONLY = &H1
Private Const FILE_ATTRIBUTE_SYSTEM = &H4
Private Const FILE_ATTRIBUTE_TEMPORARY = &H100

'*****************************************************************************************
'Class Types
'*****************************************************************************************
Private Type OSVERSIONINFO
  dwOSVersionInfoSize As Long
  dwMajorVersion As Long
  dwMinorVersion As Long
  dwBuildNumber As Long
  dwPlatformId As Long
  szCSDVersion As String * 128
End Type

Private Type FILETIME
  dwLowDateTime As Long
  dwHightDateTime As Long
End Type

Private Type WIN32_FIND_DATA
  dwFileAttributes As Long
  ftCreationTime As FILETIME
  ftLastAccessTime As FILETIME
  ftLastWriteTime As FILETIME
  nFileSizeHigh As Long
  nFileSizeLow As Long
  dwReserved0 As Long
  dwReserved1 As Long
  cFileName As String * MAX_PATH
  cAlternate As String * 14
End Type

'*****************************************************************************************
'Class API Declarations
'*****************************************************************************************
Private Declare Function GetVersionExA Lib "kernel32" (lpVersionInformation As OSVERSIONINFO) As Long
Private Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long
Private Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" (ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long
Private Declare Function Searchpath Lib "kernel32" Alias "SearchPathA" (ByVal lpPath As String, ByVal lpFileName As String, ByVal lpExtension As String, ByVal nBufferLength As Long, ByVal lpuffer As String, ByVal lpFilePart As String) As Long
Private Declare Function FindClose Lib "kernel32" (ByVal hFindFile As Long) As Long

'*****************************************************************************************
'Public Functions
'*****************************************************************************************
Public Function BuildPath(ByVal Path As String, ByVal Name As String) As String
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  BuildPath = fso.BuildPath(Path, Name)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function CopyFile(ByVal Source As String, ByVal Destination As String, Optional OverWriteFiles As Boolean = False) As Boolean
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  fso.CopyFile Source, Destination, OverWriteFiles
  Set fso = Nothing

  CopyFile = True

On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function CopyFolder(ByVal Source As String, ByVal Destination As String, Optional OverWriteFiles As Boolean = False) As Boolean
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  fso.CopyFolder Source, Destination, OverWriteFiles
  Set fso = Nothing
 
  CopyFolder = True

On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function CreateFolder(ByVal Path As String) As Folder
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  Set CreateFolder = fso.CreateFolder(Path)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function CreateTextFile(ByVal FileName As String, Optional Overwrite As Boolean = False, Optional Unicode As Boolean = False) As TextStream
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  Set CreateTextFile = fso.CreateTextFile(FileName, Overwrite, Unicode)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function DeleteFile(ByVal FileSpec As String, Optional Force As Boolean = False) As Boolean
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  fso.DeleteFile FileSpec, Force
  Set fso = Nothing
 
  DeleteFile = True

On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function DeleteFolder(ByVal FolderSpec As String, Optional Force As Boolean = False) As Boolean
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  fso.DeleteFolder FolderSpec, Force
  Set fso = Nothing

  DeleteFolder = True

On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function DriveExists(ByVal DriveSpec As String) As Boolean
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  DriveExists = fso.DriveExists(DriveSpec)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Property Get Drives() As Drives
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  Set Drives = fso.Drives
  Set fso = Nothing
On_exit:
  Exit Property
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Property

Public Function FileExists(ByVal FileSpec As String) As Boolean
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  FileExists = fso.FileExists(FileSpec)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function FileFind(ByVal FileName As String, ByVal Path As String) As String
On Error GoTo On_Error
  Dim hFile As Long
  Dim ts As String
  Dim WFD As WIN32_FIND_DATA
  Dim result As Long
  Dim sAttempt As String
  Dim szPath As String
  Dim szPath2 As String
  Dim szFileName As String
  Dim dwBufferLen As Long
  Dim szBuffer As String
  Dim lpFilePart As String
 
  szPath = Me.BuildPath(Path, "*.*" & Chr$(0))
  szPath2 = Path & Chr$(0)
  szFileName = FileName & Chr$(0)
  szBuffer = String$(MAX_PATH, 0)
  dwBufferLen = Len(szBuffer)
  result = Searchpath(szPath2, szFileName, vbNullString, dwBufferLen, szBuffer, lpFilePart)

  If result Then
    FileFind = TrimNull(szBuffer)
    Exit Function
  End If
 
  hFile = FindFirstFile(szPath, WFD)
 
  Do
    If WFD.dwFileAttributes And FILE_ATTRIBUTE_DIRECTORY Then
      ts = TrimNull(WFD.cFileName)
      If Not (ts = "." Or ts = "..") Then
        If Not (WFD.dwFileAttributes And (FILE_ATTRIBUTE_HIDDEN Or FILE_ATTRIBUTE_SYSTEM)) Then
          sAttempt = FileFind(FileName, Me.BuildPath(Path, ts))
          If sAttempt <> "" Then
            FileFind = sAttempt
            Exit Do
          End If
        End If
      End If
    End If
    WFD.cFileName = ""
    result = FindNextFile(hFile, WFD)
  Loop Until result = 0
  FindClose hFile

On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function FolderExists(ByVal FolderSpec As String) As Boolean
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  FolderExists = fso.FolderExists(FolderSpec)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function FileSearch(ByVal FileName As String) As String
On Error GoTo On_Error
  Dim drv As Drive
  Dim sPath As String
 
  For Each drv In Me.Drives
    sPath = Me.FileFind(FileName, drv.Path & "\")
    If sPath <> vbNullString Then Exit For
  Next drv
 
  FileSearch = sPath
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetAbsolutePathName(ByVal Path As String) As String
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  GetAbsolutePathName = fso.GetAbsolutePathName(Path)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetBaseName(ByVal Path As String) As String
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  GetBaseName = fso.GetBaseName(Path)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetDrive(ByVal DriveSpec As String) As Drive
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  Set GetDrive = fso.GetDrive(DriveSpec)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetDriveName(ByVal Path As String) As String
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  GetDriveName = fso.GetDriveName(Path)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetExtensionName(ByVal Path As String) As String
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  GetExtensionName = fso.GetExtensionName(Path)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetFile(ByVal FilePath As String) As File
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  Set GetFile = fso.GetFile(FilePath)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetFileName(ByVal Path As String) As String
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  GetFileName = fso.GetFileName(Path)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetFileVersion(ByVal FileName As String) As String
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  GetFileVersion = fso.GetFileVersion(FileName)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetFolder(ByVal FolderPath As String) As Folder
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  Set GetFolder = fso.GetFolder(FolderPath)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetParentFolderName(ByVal Path As String) As String
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  GetParentFolderName = fso.GetParentFolderName(Path)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetSpecialFolder(ByVal SpecialFolder As SpecialFolderConst) As Folder
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  Set GetSpecialFolder = fso.GetSpecialFolder(SpecialFolder)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetStandardStream(ByVal StandardStreamType As StandardStreamTypes, Optional Unicode As Boolean = False) As TextStream
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  Set GetStandardStream = fso.GetStandardStream(StandardStreamType, Unicode)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function GetTempName() As String
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  GetTempName = fso.GetTempName
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function MoveFile(ByVal Source As String, ByVal Destination As String) As Boolean
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  fso.MoveFile Source, Destination
  Set fso = Nothing

  MoveFile = True

On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function MoveFolder(ByVal Source As String, ByVal Destination As String) As Boolean
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  fso.MoveFolder Source, Destination
  Set fso = Nothing

  MoveFolder = True

On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

Public Function OpenTextFile(ByVal FileName As String, Optional IOMode As IOMode = ForReading, Optional Create As Boolean = False, Optional Format As Tristate = TristateFalse) As TextStream
On Error GoTo On_Error
  Dim fso As FileSystemObject
 
  Set fso = New FileSystemObject
  Set OpenTextFile = fso.OpenTextFile(FileName, IOMode, Create, Format)
  Set fso = Nothing
On_exit:
  Exit Function
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Function

'*****************************************************************************************
'Operating System Information
'****************************************************************************************
Public Property Get OS_BuildNumber() As Long
On Error GoTo On_Error
  Dim osi As OSVERSIONINFO
  Dim ret As Long

  osi.dwOSVersionInfoSize = 148
  osi.szCSDVersion = Space$(128)
  ret = GetVersionExA(osi)
 
  OS_BuildNumber = osi.dwBuildNumber
On_exit:
  Exit Property
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Property

Public Property Get OS_MajorVersion() As Long
On Error GoTo On_Error
  Dim osi As OSVERSIONINFO
  Dim ret As Long

  osi.dwOSVersionInfoSize = 148
  osi.szCSDVersion = Space$(128)
  ret = GetVersionExA(osi)
 
  OS_MajorVersion = osi.dwMajorVersion
On_exit:
  Exit Property
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Property

Public Property Get OS_MinorVersion() As Long
On Error GoTo On_Error
  Dim osi As OSVERSIONINFO
  Dim ret As Long

  osi.dwOSVersionInfoSize = 148
  osi.szCSDVersion = Space$(128)
  ret = GetVersionExA(osi)
 
  OS_MinorVersion = osi.dwMinorVersion
On_exit:
  Exit Property
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Property

Public Property Get OS_PlatformId() As Long
On Error GoTo On_Error
  Dim osi As OSVERSIONINFO
  Dim ret As Long

  osi.dwOSVersionInfoSize = 148
  osi.szCSDVersion = Space$(128)
  ret = GetVersionExA(osi)
 
  OS_PlatformId = osi.dwPlatformId
On_exit:
  Exit Property
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Property

Public Property Get OS_MajorVersionName() As String
On Error GoTo On_Error
  Select Case Me.OS_PlatformId
    Case 1 'Win 9x
      Select Case Me.OS_MinorVersion
        Case 0 '95
          OS_MajorVersionName = "Windows 95"
        Case 10 '98
          OS_MajorVersionName = "Windows 98"
      End Select
    Case 2 'Win NT
      Select Case Me.OS_MajorVersion
        Case 3 'NT 3
          OS_MajorVersionName = "Windows NT 3.51"
        Case 4 'NT 4
          OS_MajorVersionName = "Windows NT 4.0"
        Case 5 '2000
          OS_MajorVersionName = "Windows 2000"
      End Select
  End Select
On_exit:
  Exit Property
On_Error:
  MsgBox Err.Description, vbExclamation, "Program Error: " & Err.Number
  Resume On_exit
End Property

0
 
LVL 4

Expert Comment

by:RichW
Comment Utility
Try this.  Set a reference to the Microsoft Scripting Runtime dll.

Assume there is a listbox, and command button on a form.

Private Sub Command1_Click()
Dim fso As New Scripting.FileSystemObject
Set fso = CreateObject("scripting.filesystemobject")

Dim fldr As Folder
Dim AllFiles
Dim file As file
Dim name
Set fldr = fso.GetFolder("c:\my documents")
Set AllFiles = fldr.Files
For Each file In AllFiles
    Select Case Right(file.name, 4)
        Case ".ini"
            Form1.List1.AddItem file.name
        Case ".doc"
            Form1.List1.AddItem file.name
        Case ".ppt"
            Form1.List1.AddItem file.name
    End Select
   
Next

End Sub

This will populate the listbox with whatever files you want.  Just add them to the Select list.

Rich
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 4

Expert Comment

by:RichW
Comment Utility
Ooops.  Remove the "Dim Name".  I was testing something and forgot to take it out.

:~D
0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 300 total points
Comment Utility
Hi!

Here's a link to a file over the net.

Download...
http://www.vb-helper.com/Howto/search2.zip

Description: Search for files matching a pattern and show their total size (3K)

Note: To search for all files, just type *.* in the textbox.  To search for say... jpg files, type in *.jpg

That's it!

glass cookie : )
0
 

Author Comment

by:phred_the_cat
Comment Utility
Thanks man, this answers the mail

0
 
LVL 8

Expert Comment

by:glass_cookie
Comment Utility
I'm glad it helped : )
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now