Trouble with Excel 2010/ MS VB for Applications - Compile Error: User-defined type not defined

BarbTie

New Member
Joined
May 16, 2014
Messages
2
Excel 2010, Win7.
I'm trying to use a Re-Login macro button on a spreadsheet.
VB throws the Compile Error: User-defined type not defined. Clicking ok on the error highlights the following code:
Public objHTTP As LawSSOHttp2.SSOHttp.

The code in this General Declarations is:
Option Explicit
'Login Variables
Public gsServer As String
Public gsUserName As String
Public gsPassword As String
Public gsProductLine As String
Public gaLoginInfo As Variant
Public nRun As Long
'Set Tools | References for
' Microsoft XML, v4.0
' Lawson SSO Http 2
'Server Variables
Public objDOMDoc As MSXML2.DOMDocument40
Public objHTTP As LawSSOHttp2.SSOHttp
Public bSaveString As Boolean
'Constants
Global Const LOGIN_DIR = "C:\Program Files\Lawson Software\Common\"
Global Const HISTORY_FILE = "LoginHist.nbp"
Global Const CONVERSION_FACTOR = 10

This is an old .xls spreadsheet running in Compatibility Mode.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
go to tools>references check to see if you have check mark next to LawSSOHttp2 if not then find it in the list of references and the check mark next to it. see if it works
 
Upvote 0
Shahzadt, There was no LawSSOHttp2 in the tools>references. There was however a LawsSSOHttp3. I updated the VB code to reflect the correct reference and the issue is resolved. Thanks for pointing me in the right direction!
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,964
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top