Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!f10g2000vbf.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Calling Excel macro commands from Matlab
Date: Tue, 15 Sep 2009 09:51:34 -0700 (PDT)
Organization: http://groups.google.com
Lines: 28
Message-ID: <48457b05-3701-4d8e-a37c-4665ddb3a207@f10g2000vbf.googlegroups.com>
References: <h8ofv6$7ek$1@fred.mathworks.com>
NNTP-Posting-Host: 77.17.214.170
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1253033494 19927 127.0.0.1 (15 Sep 2009 16:51:34 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 15 Sep 2009 16:51:34 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: f10g2000vbf.googlegroups.com; posting-host=77.17.214.170; 
	posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; 
	Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; 
	.NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:570536


On 15 Sep, 18:39, "Conrad " <conr...@gmx.net> wrote:
> Hi, I have the following excel Macro:
>     Range("F1:F18").Select
>     With Selection.Borders(xlEdgeLeft)
>         .LineStyle = xlContinuous
>         .Weight = xlThin
>         .ColorIndex = xlAutomatic
>     End With
>     With Selection.Borders(xlEdgeRight)
>         .LineStyle = xlContinuous
>         .Weight = xlThin
>         .ColorIndex = xlAutomatic
>     End With
> It basically draws 2 vertical lines in a table.
>
> I am aware that it's possible to run an excel macro from within Matlab but can I use Matlab commands to draw these vertical lines without having to call a macro?

Well... don't know if this qualifies as 'matlab commands',
but you can use matlab to issue commands to excel to do what
you want.

The problem is how to map the commands in the VBA macro over
to something that cam be issued to excel from matlab via the
COM interface.

Rune