Rx_
Nothing In Moderation
- Local time
- Today, 02:12
- Joined
- Oct 22, 2009
- Messages
- 2,803
Can an Application check the Workstation for Excel Version using late binding, then use the results for code to set a (Tools Reference) Reference to that Excel version and continue the VBA code using early binding?
- Just wondering if anyone has tried that? was it successful?
e.g. send code to a client workstation, determine if it is Excel 2000 or Excel 2010, - take the result of that - Create a reference to that Excel version - then continue with Early Binding code. Thus avoiding the slow processing and painful conversion of late binding.
Was looking at some code along that line.
Also was wondering if WMI might be used to make that determination for older versions of Excel / OS?
Also uploaded a sample MDB using WMI titled:
WMI(Windows Management Instrumentation) using VBA instead of scripts.
Located At: http://gainingaccess.net/GainingAccess/FreeDownloads.aspx#WMISampleDb
This actually works on my workstation (Win 7 32 bit with Office 2010)
It is the only working sample of WMI that I found. Lots of code I have yet to go through.
For consideration:
- Just wondering if anyone has tried that? was it successful?
e.g. send code to a client workstation, determine if it is Excel 2000 or Excel 2010, - take the result of that - Create a reference to that Excel version - then continue with Early Binding code. Thus avoiding the slow processing and painful conversion of late binding.
Was looking at some code along that line.
Also was wondering if WMI might be used to make that determination for older versions of Excel / OS?
Also uploaded a sample MDB using WMI titled:
WMI(Windows Management Instrumentation) using VBA instead of scripts.
Located At: http://gainingaccess.net/GainingAccess/FreeDownloads.aspx#WMISampleDb
This actually works on my workstation (Win 7 32 bit with Office 2010)
It is the only working sample of WMI that I found. Lots of code I have yet to go through.
For consideration:
Code:
' insert into a public module in Excel.
Public Sub ReturnExcelVersion()
If Application.Version = "12.0" Then
MsgBox "You are using Excel 2007."
ElseIf Application.Version = "11.0" Then
MsgBox "You are using Excel 2003."
ElseIf Application.Version = "10.0" Then
MsgBox "You are using Excel 2002."
ElseIf Application.Version = "9.0" Then
MsgBox "You are using Excel 2000."
ElseIf Application.Version = "8.0" Then
MsgBox "You are using Excel 97."
ElseIf Application.Version = "14.0" Then
MsgBox "You are using Excel 2010 hey, what happened to Version 13.0 ??"
End If
MsgBox "Microsoft Excel is using " & Application.OperatingSystem
End Sub