InsaneProgrammer
Programmer
I have some code in an Access 97 database that performs a screen scrap and populates a form. All of a sudden the code has stopped working. Nothing was changed. The code compiles fine but when it runs I get the following error:
"The specified module could not be found."
After I select OK I get Run-time error -2147221231 (80040111):
Automation error
ClassFactory cannot supply requested class.
If I select debug it shows that the error occurs where the
object is initially created. The code on that line is:
Set MySystem = CreateObject("EXTRA.System"
Below is all the code. This is the standard code I use for all my programs. It has worked correctly for years.
Option Compare Database
Option Explicit
Dim HostSettleTime As Integer
Dim iXSuccess As Integer
Dim MySystem As Object
Dim MySessions As Object
Dim MySession As Object
Dim MyScreen As Object
Dim RetValue As Boolean
Function GetExtraSession()
'create a system object
Set MySystem = CreateObject("EXTRA.System"
If (MySystem Is Nothing) Then
Beep
MsgBox "Could not create the EXTRA System object."
Stop
End If
'create a sessions object
Set MySessions = MySystem.Sessions
If (MySessions Is Nothing) Then
Beep
MsgBox "Could not create the Sessions collection object."
End
End If
'set session object
Set MySession = MySystem.ActiveSession
If (MySession Is Nothing) Then
Beep
MsgBox "Could not create the Session object."
End
End If
'checks to see that the session is visible
If Not MySession.Visible Then MySession.Visible = True
'create the screen object and make sure it is a valid object
Set MyScreen = MySession.Screen
If (MyScreen Is Nothing) Then
Beep
MsgBox "Could not create the Screen object."
End
Else
'MsgBox "Session Objects created."
iXSuccess = 1
'MySession.WindowState = wdWindowStateMaximize
End If
End Function
Any help would be greatly appreciated.
"The specified module could not be found."
After I select OK I get Run-time error -2147221231 (80040111):
Automation error
ClassFactory cannot supply requested class.
If I select debug it shows that the error occurs where the
object is initially created. The code on that line is:
Set MySystem = CreateObject("EXTRA.System"
Below is all the code. This is the standard code I use for all my programs. It has worked correctly for years.
Option Compare Database
Option Explicit
Dim HostSettleTime As Integer
Dim iXSuccess As Integer
Dim MySystem As Object
Dim MySessions As Object
Dim MySession As Object
Dim MyScreen As Object
Dim RetValue As Boolean
Function GetExtraSession()
'create a system object
Set MySystem = CreateObject("EXTRA.System"
If (MySystem Is Nothing) Then
Beep
MsgBox "Could not create the EXTRA System object."
Stop
End If
'create a sessions object
Set MySessions = MySystem.Sessions
If (MySessions Is Nothing) Then
Beep
MsgBox "Could not create the Sessions collection object."
End
End If
'set session object
Set MySession = MySystem.ActiveSession
If (MySession Is Nothing) Then
Beep
MsgBox "Could not create the Session object."
End
End If
'checks to see that the session is visible
If Not MySession.Visible Then MySession.Visible = True
'create the screen object and make sure it is a valid object
Set MyScreen = MySession.Screen
If (MyScreen Is Nothing) Then
Beep
MsgBox "Could not create the Screen object."
End
Else
'MsgBox "Session Objects created."
iXSuccess = 1
'MySession.WindowState = wdWindowStateMaximize
End If
End Function
Any help would be greatly appreciated.