I am running this macro and it keeps stopping at the Dim fso As New FileSystemObject and won’t run. It used to run before but now it won’t. What can i do to get around it? thanks
I get the error “compile error User-defined type not defined”
Private Sub cmdRun_Click()
Dim mBk As Workbook
Dim dBk As Workbook
Dim mSht As Worksheet
Dim dSht As Worksheet
Dim oSht As Worksheet
Dim dRng As Range
Dim fName As String
Dim dPath As String
Dim dCol As Integer
Dim qText As String
Dim brand As String
Dim qRow As Integer
Dim dRow As Long
Dim oRow As Integer
Dim oCol As Integer
Dim sText As String
Dim c As Integer
Dim d As Integer
Dim e As Integer
Dim f As Integer
Dim fso As New FileSystemObject
Set mBk = ActiveWorkbook
Set mSht = ActiveSheet
fName = mSht.Range(“dFile”).Value
dPath = ActiveWorkbook.Path & Chr$(92) & mSht.Range(“dFolder”).Value & Chr$(92)
dCol = mSht.Range(“dCol”).Value
Set oSht = mBk.Sheets(“D1”)
oSht.Range(“clear”).ClearContents
c = 1
qRow = oSht.Range(“Q_” & c).Row
d = 1
While fso.FileExists(dPath & fName & c & “.xls”)