Hi,
I am very new to VBA/Marco for Excel. I’ve been using a Macro created by someone else at work (he no longer works here.) The macro worked like a charm until my computer upgrade from a 32Bit Windows XP to a 64Bit Windows 7. I downloaded and installed the updated version of Win32API.txt from Microsoft but still no luck. Below is the error message when I try to run the macro:
“Run-time error ‘424’:
Object Required
The following script under VBAProject>Forms>loginForm pops up when I clicked the debug button, (highlighted section is the error):
I am very new to VBA/Marco for Excel. I’ve been using a Macro created by someone else at work (he no longer works here.) The macro worked like a charm until my computer upgrade from a 32Bit Windows XP to a 64Bit Windows 7. I downloaded and installed the updated version of Win32API.txt from Microsoft but still no luck. Below is the error message when I try to run the macro:
“Run-time error ‘424’:
Object Required
The following script under VBAProject>Forms>loginForm pops up when I clicked the debug button, (highlighted section is the error):
Option Explicit
Private Sub btnCancel_Click()
Unload Me
End Sub
Private Sub btnLogon_Click()
If TextBox1 = "" Then
MsgBox "Logon ID is blank."
TextBox1.SetFocus
Else
If TextBox2 = "" Then
MsgBox "Password is blank."
TextBox2.SetFocus
Else
Me.Hide
Call Sheet1.loginFAMIS(TextBox1, TextBox2)
Unload Me
End If
End If
End Sub
Private Sub TextBox2_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
btnLogon_Click
End If
End Sub
Private Sub btnCancel_Click()
Unload Me
End Sub
Private Sub btnLogon_Click()
If TextBox1 = "" Then
MsgBox "Logon ID is blank."
TextBox1.SetFocus
Else
If TextBox2 = "" Then
MsgBox "Password is blank."
TextBox2.SetFocus
Else
Me.Hide
Call Sheet1.loginFAMIS(TextBox1, TextBox2)
Unload Me
End If
End If
End Sub
Private Sub TextBox2_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
btnLogon_Click
End If
End Sub
I also ran the VBA Inspector Code in excel, below is the report
VBA Compatibility Inspector Report
Project References:
===================
These references (Libraries and Controls) may not be 64-bit compatible.
You may need to verify their compatibility. For more information see:
Compatibility Between the 32-bit and 64-bit Versions of Office 2010
1) ObjectX Mainframe Display Control, [ObjectXMFDisplay], {91858520-87B5-11CE-A0B6-0800095A05C3}, C:\Program Files (x86)\Micro Focus\RUMBA\Mframe\WdMfDsp.Ocx
Project References:
===================
These references (Libraries and Controls) may not be 64-bit compatible.
You may need to verify their compatibility. For more information see:
Compatibility Between the 32-bit and 64-bit Versions of Office 2010
1) ObjectX Mainframe Display Control, [ObjectXMFDisplay], {91858520-87B5-11CE-A0B6-0800095A05C3}, C:\Program Files (x86)\Micro Focus\RUMBA\Mframe\WdMfDsp.Ocx
Thanks for your help!
Ray
Ray