Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default opening excel through visual basic

please help me out
i prepared a workbook to be a template for vbasic code output, the code
fills tables and the excel do the charting and so on.
problem is: i am using the Createobject function to open the .xls file from
its location , i have MATLAB addin excelink loaded but when vbasic opens
excel this addin does not load automatically.....i heard that getobject can
help solve my problem??
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default opening excel through visual basic

Does this work?

(assuming Set xlApp = CreateObject("Excel10.Application"))

xlApp.AddIns("MATLab").Installed = True

Hth,
OJ

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default opening excel through visual basic

I don't think that this will work,. Via automation, the addins are not
loaded, it is not just that their installed property is not set. You need to
explicitly load them

Dim oAddin

For Each oAddin In Application.AddIns
If oAddin.Name = "MATLAB.xla" Then
xl.Workbooks.Open(oAddin.FullName).RunAutoMacros 1
End If
Next


--

HTH

RP
(remove nothere from the email address if mailing direct)


"OJ" wrote in message
ups.com...
Does this work?

(assuming Set xlApp = CreateObject("Excel10.Application"))

xlApp.AddIns("MATLab").Installed = True

Hth,
OJ



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default opening excel through visual basic

sorry , but what should replace fullname in (oAddin.FullName) and do i write
oAddin with an o?!

"Bob Phillips" wrote:

I don't think that this will work,. Via automation, the addins are not
loaded, it is not just that their installed property is not set. You need to
explicitly load them

Dim oAddin

For Each oAddin In Application.AddIns
If oAddin.Name = "MATLAB.xla" Then
xl.Workbooks.Open(oAddin.FullName).RunAutoMacros 1
End If
Next


--

HTH

RP
(remove nothere from the email address if mailing direct)


"OJ" wrote in message
ups.com...
Does this work?

(assuming Set xlApp = CreateObject("Excel10.Application"))

xlApp.AddIns("MATLab").Installed = True

Hth,
OJ




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default opening excel through visual basic

Nothing, use as given.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"kafoury123" wrote in message
...
sorry , but what should replace fullname in (oAddin.FullName) and do i

write
oAddin with an o?!

"Bob Phillips" wrote:

I don't think that this will work,. Via automation, the addins are not
loaded, it is not just that their installed property is not set. You

need to
explicitly load them

Dim oAddin

For Each oAddin In Application.AddIns
If oAddin.Name = "MATLAB.xla" Then
xl.Workbooks.Open(oAddin.FullName).RunAutoMacros 1
End If
Next


--

HTH

RP
(remove nothere from the email address if mailing direct)


"OJ" wrote in message
ups.com...
Does this work?

(assuming Set xlApp = CreateObject("Excel10.Application"))

xlApp.AddIns("MATLab").Installed = True

Hth,
OJ






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
Opening Visual Basic Editor SteveG[_5_] Excel Discussion (Misc queries) 0 March 19th 09 01:46 PM
On opening program get MS Visual Basic error KT Excel Discussion (Misc queries) 1 February 25th 09 01:05 AM
Visual Basic Error when opening Excel Mary Excel Discussion (Misc queries) 1 February 1st 06 08:11 PM
Visual Basic I/O error when opening Excel file SK Low Excel Worksheet Functions 0 November 24th 05 09:52 AM
Opening a PDF document from Visual basic Klaus[_3_] Excel Programming 4 October 23rd 03 03:15 PM


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