treeview and laptops

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working on a huge project using treeviews in Excel. Everything works
greate on the desktops, but only half of the laptops work OK. Why would some
of th laptops error out? Error(57121) = "Application-defined or
object-defined error"

I would greatly appreciate any help you can give!

Thank you!

JD
 
Is there a code snippet somewhere to help check this? I'm using treeview in
a new project, sounds like I might run into the same problem if I deploy
without code to check this...
 
hmm...

in any case you're lucky it's mnot a compile error.

you can't code latebound and remove reference.
as you'll have the treeview embedded in your form
or worksheet..

If and only IF the users/administrator have
Enabled "access to the VisualBasic module"

you could check the Major and Minor in the references
via VBIDE (Microsoft VBA Extensibility)
but these will not be conclusive..
though hardcoding may not be pretty either..


Sub RefComctl()
Const cVers = "6.1.97.82"
Dim sFile$, sVers$

With ThisWorkbook.VBProject.References("mscomctllib")
If .Major = 2 And .Minor = 0 Then
sFile = .FullPath
'version ok
Else
MsgBox "you'll need to upgrade your msComCtl.ocx"
Exit Sub
End If
End With

With CreateObject("Scripting.FileSystemObject")
sVers = .GetFileVersion(sFile)
If sVers <> cVers Then
MsgBox _
"you need version: " & cVers & vbNewLine & _
"you have version:" & sVers
End If

End With

End Sub





keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >


KR wrote in message
 
Back
Top