Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Can I find what ver of IE is running via VBA ?

http://groups.google.com/groups?thre...00%40hydro.com

Has a couple of scripts that you can embed into your code:

Here's with the vba mods:

Option Explicit
Sub testme01()

Dim FSO As Object
Dim Shell As Object
Dim sKey As String
Dim sPath As String

Set FSO = CreateObject("scripting.filesystemobject")
Set Shell = CreateObject("wscript.shell")
sKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersio n\" _
& "App Paths\IEXPLORE.EXE\"
sPath = Shell.RegRead(sKey)
MsgBox FSO.getfileversion(sPath)

End Sub

'the second one uses Split. It needs xl2k or higher.


Sub testme02()
Dim oShell As Object
Dim SRegPath As String
Dim sIEVer As String
Dim iMajorVersion As Long
Dim iMinorVersion As Long
Dim iBuildVersion As Long
Dim iSubBuildVersion As Long
Dim aIEVer As Variant


SRegPath = "HKLM\SOFTWARE\Microsoft\Internet Explorer\Version"

Set oShell = CreateObject("wscript.shell")
On Error Resume Next
sIEVer = oShell.RegRead(SRegPath)

If Err < 0 Then
' IE version is 3.0 or less, set it to 0
sIEVer = "0.0.0.0"
End If
On Error GoTo 0

aIEVer = Split(sIEVer, ".")
iMajorVersion = CLng(aIEVer(0))
iMinorVersion = CLng(aIEVer(1))
iBuildVersion = CLng(aIEVer(2))
iSubBuildVersion = CLng(aIEVer(3))

MsgBox "IE full version is : " & sIEVer
MsgBox "IE version is : " & iMajorVersion & "." & iMinorVersion
End Sub



Neil wrote:

Is there anyway to get the version number for an
installed programme via VBA in Excel ?

Many thanks in advance...


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running total over a find number of days Zorro[_2_] Excel Worksheet Functions 15 January 17th 09 11:25 PM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Is it possible to find which sql statement is running? nkw Charts and Charting in Excel 0 September 8th 06 05:56 AM
how can i find out which macro is running mel535 Setting up and Configuration of Excel 0 March 29th 06 04:59 PM
Where can I find the file ABC Sales.xls used in the Book "Running. camper56 New Users to Excel 2 March 5th 05 10:54 PM


All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"