Re: [Rcom-l] Detecting if RExcel is installed

2008-07-17 Thread Andrew McLachlan
Thank you Erich I have just been reading about the AddIns collection and was wondering whether to use that approach or not. Your reply has stopped me wondering :-) and I will be adding your code to my project. During my testing of the functions below, I found that they worked as expected. That is

RE: [Rcom-l] Detecting if RExcel is installed

2008-07-17 Thread Christian Prinoth
There are a few objects in vba for handling addins. If you search for "addin" in excel's vba help you will find all necessary details. Basically, you should be able to do something like this: For ai in Application.addins if ai.name="RExcel" then found=true Next ai -Original Message---

Re: [Rcom-l] Detecting if RExcel is installed

2008-07-17 Thread Erich Neuwirth
Function AddinInstalledAndEnabled(aiName As String) As Boolean Dim result As Boolean result = False For Each ai In Application.AddIns If ai.Name = aiName Then result = result Or ai.Installed End If If result Then Exit For Next ai AddinInstall