Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #110867
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Adrian Caspersz <email@here.invalid> |
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: executing VBA macro in Excel from OLE |
| Date | Tue, 26 Mar 2019 23:58:09 +0000 |
| Organization | Keep Usenet Text Newsgroups Alive!! |
| Lines | 19 |
| Message-ID | <gfvskiFr119U1@mid.individual.net> (permalink) |
| References | <q7dok0$673$2@dont-email.me> <q7ds1b$vp1$1@dont-email.me> <gfveotFo30nU1@mid.individual.net> <q7e9mn$1vl$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net PiguEtmXanNZ/3OJCwWiKArdo8cKGBLjcOld5u4b16lA/8W+Cq |
| Cancel-Lock | sha1:9RQ8ym00DMxWZ4+f9xrhbharZc4= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
| In-Reply-To | <q7e9mn$1vl$1@dont-email.me> |
| Content-Language | en-GB |
| Xref | csiph.com microsoft.public.excel.programming:110867 |
Show key headers only | View raw
On 26/03/2019 22:39, Lynn McGuire wrote:
> On 3/26/2019 3:01 PM, Adrian Caspersz wrote:
>
> Cool, I got it to work with the following and my macro was run:
>
> PS C:\Users\lmc> $E = New-Object -ComObject Excel.Application
> PS C:\Users\lmc> $workbook = $E.Workbooks.Open("C:\dii\spreadsheet2.xlsm")
> PS C:\Users\lmc> $E.Run("testmacro")
> PS C:\Users\lmc> $workbook.save()
> PS C:\Users\lmc> $workbook.close()
>
> But I could not get Excel to quit:
>
> PS C:\Users\lmc> $workbook.quit()
$E.quit() should work.
--
Adrian C
Back to microsoft.public.excel.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
executing VBA macro in Excel from OLE Lynn McGuire <lynnmcguire5@gmail.com> - 2019-03-26 12:47 -0500
Re: executing VBA macro in Excel from OLE Lynn McGuire <lynnmcguire5@gmail.com> - 2019-03-26 13:46 -0500
Re: executing VBA macro in Excel from OLE Adrian Caspersz <email@here.invalid> - 2019-03-26 20:01 +0000
Re: executing VBA macro in Excel from OLE Lynn McGuire <lynnmcguire5@gmail.com> - 2019-03-26 16:54 -0500
Re: executing VBA macro in Excel from OLE Lynn McGuire <lynnmcguire5@gmail.com> - 2019-03-26 17:39 -0500
Re: executing VBA macro in Excel from OLE Adrian Caspersz <email@here.invalid> - 2019-03-26 23:58 +0000
Re: executing VBA macro in Excel from OLE GS <gs@v.invalid> - 2019-03-27 11:47 -0400
Re: executing VBA macro in Excel from OLE Lynn McGuire <lynnmcguire5@gmail.com> - 2019-03-27 16:30 -0500
Re: executing VBA macro in Excel from OLE Adrian Caspersz <email@here.invalid> - 2019-03-28 00:28 +0000
Re: executing VBA macro in Excel from OLE Lynn McGuire <lynnmcguire5@gmail.com> - 2019-03-26 14:47 -0500
csiph-web