LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default VB dll, Excell and matlab

Hi,

Need some help regarding the following. I am making a VB DLL to convert some
of my excel macro code. The following is working fine where I set "myRng" as
an excel range, and then create a VB variable "myR" with a for statement and
then send it to matlab using the PutFullMatrix. Something like this

Sub MySub(myApp As Object)
Set myRng = myApp.Worksheets("Sheet1").Range("A1:A10")
myRows = myApp.Worksheets("Sheet1").Range("A1:A10").rows.Co unt
For i = 0 To myRows - 1
myR(i, 0) = myRng(i + 1)
Next i
Set Matlab = CreateObject("matlab.application")
Call Matlab.PutFullMatrix ("myR", "base", myR, myRImag)

Now my question is: Why do I have to use a for statement. That would make me
use as many for loops as there are input ranges. Can't I do something like:

Sub MySub(myApp As Object)
Set myRng = myApp.Worksheets("Sheet1").Range("A1:A10")

Set Matlab = CreateObject("matlab.application")
Call Matlab.PutFullMatrix ("myR", "base", myRng, myRImag)

where I send the variable "myRng" directly to matlab instead of explicitly
using a for loop to create a VB varaible.



--
- Mangesh
------------------------------------------
Office 2003 & Windows XP


 
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
Use Excel like Matlab? sjlesnia Excel Discussion (Misc queries) 0 March 21st 07 10:14 PM
Matlab & Excel interface? cfman Excel Discussion (Misc queries) 1 March 21st 07 06:03 PM
Pasting data from Matlab to Microsoft Excel nt_artagnian Excel Worksheet Functions 5 March 3rd 07 07:47 PM
how can ý call matlab function from matlab to excel gurhan Excel Discussion (Misc queries) 0 November 29th 06 08:40 AM
how do i do an inline function like in matlab jonathon wycherley Excel Worksheet Functions 4 December 11th 04 12:15 AM


All times are GMT +1. The time now is 01:00 PM.

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

About Us

"It's about Microsoft Excel"