I have the following code. it should display a message box asking whether formatting has taken place? if it has then it should run a macro in an xls file. this occurs with amodule in access.
Sub IsFormated()
Dim Answer As Integer
Answer = MsgBox("Is the file formated ?", vbYesNo, "Format"
If Answer = vbYes Then
Dim appExcel As Excel.Application '''''error here'''
Set appExcel = CreateObject("Excel.Application"
appExcel.Visible = True
appExcel.Workbooks.Open "V:\Risk_Mgmt_Credit\Canada monitoring\MacroHolder.xls"
appExcel.Run "Module1.Format_Report"
appExcel.Workbooks("report144alll.xls".Close True
End If
End Sub
the error is a user defind type not defined. what do i do?
please help
Sub IsFormated()
Dim Answer As Integer
Answer = MsgBox("Is the file formated ?", vbYesNo, "Format"
If Answer = vbYes Then
Dim appExcel As Excel.Application '''''error here'''
Set appExcel = CreateObject("Excel.Application"
appExcel.Visible = True
appExcel.Workbooks.Open "V:\Risk_Mgmt_Credit\Canada monitoring\MacroHolder.xls"
appExcel.Run "Module1.Format_Report"
appExcel.Workbooks("report144alll.xls".Close True
End If
End Sub
the error is a user defind type not defined. what do i do?
please help