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.DisplayHeadin
gs = blnStatus
ActiveWindow.DisplayGridli
nes = blnStatus
ActiveWindow.DisplayHorizo
ntalScroll
Bar = blnStatus
ActiveWindow.DisplayWorkbo
okTabs = blnStatus
ActiveWindow.DisplayFormul
as = blnStatus
Application.DisplayFormula
Bar = blnStatus
ActiveWindow.DisplayVertic
alScrollBa
r = True
ActiveWindow.Zoom = 115
Next
End If
End Sub
//////////////////////////
//////////
//////////
//////////
//////////
//////////
//////////
//////
Start Free Trial