Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Calling Excel macro commands from Matlab
Date: Tue, 15 Sep 2009 16:39:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <h8ofv6$7ek$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1253032742 7636 172.30.248.35 (15 Sep 2009 16:39:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 15 Sep 2009 16:39:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1560446
Xref: news.mathworks.com comp.soft-sys.matlab:570532


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?

Thanks for your help!