Advertisement

12.11.2007 at 08:13AM PST, ID: 23015833
[x]
Attachment Details

Complie Error - ADO references Problem

Asked by LoveToSpod in Microsoft Excel Spreadsheet Software, Visual Basic Programming, VB Script

Tags: ado, references

Hi There,

I have written a simple application in MSExcel. When some users use the workbook they instantly get a Compile Error. I go to the VBA edtior, select Tools | Refereneces, and the "Microsoft ActiveX Data Objects 2.8 Library" reference is missing. The problem is being experienced on a few user's PC's.

What can I do to deal with this?
Could the following code be written using a more compatible version of VBA?

The code that causes the error is the <<win>> word in the following line of script, I have included the entire sub it sits in is below.

        For Each win In Application.Windows

Entire sub:
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Public Sub SetViewOptions(blnStatus As Boolean)
    blnAdminMode = False 'set this mode when Devving to prevent view options being set everytime there is a page change.
    If blnAdminMode = False Then
        For Each win In Application.Windows
            ActiveWindow.DisplayHeadings = blnStatus
            ActiveWindow.DisplayGridlines = blnStatus
            ActiveWindow.DisplayHorizontalScrollBar = blnStatus
            ActiveWindow.DisplayWorkbookTabs = blnStatus
            ActiveWindow.DisplayFormulas = blnStatus
            Application.DisplayFormulaBar = blnStatus
            ActiveWindow.DisplayVerticalScrollBar = True
            ActiveWindow.Zoom = 115
        Next
    End If
End Sub
////////////////////////////////////////////////////////////////////////////////////////////Start Free Trial
[+][-]12.11.2007 at 08:24AM PST, ID: 20450346

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]12.11.2007 at 08:49AM PST, ID: 20450562

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]12.11.2007 at 08:59AM PST, ID: 20450656

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.11.2007 at 12:08PM PST, ID: 20452227

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Excel Spreadsheet Software, Visual Basic Programming, VB Script
Tags: ado, references
Sign Up Now!
Solution Provided By: 3_S
Participating Experts: 4
Solution Grade: A
 
 
[+][-]12.11.2007 at 08:17PM PST, ID: 20454990

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]12.12.2007 at 06:50AM PST, ID: 20457296

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628