Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Excel 2007 VBA Programmer's Reference ISBN: 978-0-470-04643-2
This is the forum to discuss the Wrox book Excel 2007 VBA Programmer's Reference by John Green, Stephen Bullen, Rob Bovey, Michael Alexander; ISBN: 9780470046432
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Excel 2007 VBA Programmer's Reference ISBN: 978-0-470-04643-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 11th, 2011, 03:02 AM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default excel to exe

how to excel file into exe ?
my problem is : I want an exe file or msoffice adin in excel file . when one runs the excel file the adin or exe automatically run itself.is if possible to do this?
  #2 (permalink)  
Old November 12th, 2011, 07:07 PM
Friend of Wrox
Points: 689, Level: 9
Points: 689, Level: 9 Points: 689, Level: 9 Points: 689, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Posts: 171
Thanks: 0
Thanked 14 Times in 14 Posts
Default

Use the Shell function in the Workbook_Open event, something like this:

Code:
Option Explicit

Private Sub Workbook_Open()
    Dim RetVal
    RetVal = Shell("C:\WINDOWS\CALC.EXE", vbNormalFocus)    ' Run Calculator.
End Sub
You can find more info on the Shell function in VBA help.

If you're not sure about the Workbook_Open event and where to place it, lemme know.


Similar Threads
Thread Thread Starter Forum Replies Last Post
create excel file without excel.exe ackid32 VB How-To 15 July 26th, 2013 04:31 AM
exe file in excel shah.manishkumar.v Excel VBA 1 November 8th, 2011 07:36 PM
want to run EXCEL.EXE from Visual C++ prashant_dahiya Visual C++ 0 November 3rd, 2006 02:47 AM
Excel.exe error kliu9 Excel VBA 0 October 26th, 2004 05:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.