ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   treeview and laptops (https://www.excelbanter.com/excel-programming/315903-treeview-laptops.html)

jd

treeview and laptops
 
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

keepITcool

treeview and laptops
 
check versioning/availability of the mscomctl.ocx

keepITcool

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


"?B?SkQ=?=" wrote :

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



keepITcool

treeview and laptops
 
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
:

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...

"keepITcool" wrote in message
...
check versioning/availability of the mscomctl.ocx

keepITcool

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


"?B?SkQ=?=" wrote :

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








All times are GMT +1. The time now is 01:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com