Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default VBA codes to determine program installed on PC.

How do I write the VBA code to determine whether Microsoft Outlook or Outlook Express has been installed on a PC? Would appreciate any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default VBA codes to determine program installed on PC.

Hi Francis,
here a way of doing that:

Sub OL_Test()
Const Pth As String = "HKLM\Software\Clients\Mail\"
Const Msg As String = "installed on this computer !"
Dim OL(1, 1) As String
OL(0, 0) = "Microsoft Outlook": OL(1, 0) = "Outlook Express"
OL(0, 1) = " is not ": OL(1, 1) = " is not "
If sKey(Pth & OL(0, 0) & "\") Then OL(0, 1) = " is "
If sKey(Pth & OL(1, 0) & "\") Then OL(1, 1) = " is "
MsgBox OL(0, 0) & OL(0, 1) & Msg & vbLf & OL(1, 0) & OL(1, 1) & Msg, 64
End Sub

Function sKey(K) As Boolean
Dim R
On Error Resume Next
R = CreateObject("WScript.Shell").RegRead(K)
sKey = (Err = 0)
End Function

Regards,
MP

"Francis Ang" a écrit dans le message de
...
How do I write the VBA code to determine whether Microsoft Outlook or Outlook

Express has been installed on a PC? Would appreciate any help.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default VBA codes to determine program installed on PC.

Thank you very much for your assistance. I really appreciate it.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA codes to determine program installed on PC.


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
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene LunaMoon Excel Discussion (Misc queries) 0 July 28th 08 11:03 PM
where is excel2007 installed? Aqueous Setting up and Configuration of Excel 5 May 8th 07 06:07 PM
=weeknum() - installed the add-in Marcotte A Excel Worksheet Functions 2 January 23rd 06 06:36 PM
How to determine programatically if Excel is installed PeterH Excel Discussion (Misc queries) 2 March 29th 05 08:13 PM
merging excel program with tdc finance program judy Excel Programming 0 November 5th 03 08:01 PM


All times are GMT +1. The time now is 02:54 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"