I have an Excel addin that if Excel is not open I just want to open the
addin and Excel at the same time. Is there a way to do this through VB or
VBA? This would be similar to say double clicking on the XLA through
explorer.
Thanks in advance
I have an Excel addin that if Excel is not open I just want to open the
addin and Excel at the same time. Is there a way to do this through VB or
VBA? This would be similar to say double clicking on the XLA through
explorer.
Thanks in advance
Sub OpenAddin()
Dim oXL As Object
Dim oAI As Object
On Error Resume Next
Set oXL = GetObject(, "Excel.Application")
If oXL Is Nothing Then
Set oXL = CreateObject("Excel.Application")
If Not oXL Is Nothing Then
Set oAI = oXL.Workbooks.Open(Filename:="C:\myTest\m yAddin.xla")
If oAI Is Nothing Then
MsgBox "Failed to open add-in"
End If
Else
MsgBox "failed to start Excel"
End If
End If
On Error GoTo 0
End Sub
--
HTH
Bob Phillips
"Geoff" <gh@bob.com> wrote in message
news:eHzMBpdZFHA.2664@TK2MSFTNGP15.phx.gbl...
> I have an Excel addin that if Excel is not open I just want to open the
> addin and Excel at the same time. Is there a way to do this through VB or
> VBA? This would be similar to say double clicking on the XLA through
> explorer.
>
> Thanks in advance
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks