Forms ran as EXE

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to convert a form to an EXE?
I have a user form, I want the user to open, without them seeing Excel.
Should I just use open events? When I do, it still asks me if i want to
enable the macros before it even looks at the form.

Also, when the form is closed, if the form is the only workbook open, I want
to use Application.Close, else Workbooks.Close
What is the code to determine how many workbooks are open so I can write the
if statement? I don't want to leave any loose ends in my coding, so I want to
close Excel if my form opened it, but don't want to close it if the user is
has another file open. Might not be needed if I can convert the form to EXE.
but would be nice to know for later.

TIA
Steve
 
There is no support in Excel for converting it to an EXE. That said, you
could build your app in VB and compile it to an EXE. The code would then
use OLE Automation to open Excel and display your form. Application.Visible
= False will hide the application while your form can still be visible.

Application.Workbooks.count will give you the count of open workbooks, but
you might want to loop through all the workbooks and see if they are hidden
or not (example, personal.xls), then make your decision on the visible
workbooks.


http://support.microsoft.com/support/OfficeDev/FaqVBOffice.asp
Frequently Asked Questions about Microsoft Office Automation Using Visual
Basic

http://support.microsoft.com/support/OfficeDev/offdevinapps.asp
Programming Office from Within Office

http://support.microsoft.com/?id=219151
Q219151 - HOWTO: Automate Excel 97 and Excel 2000 from Visual Basic

http://support.microsoft.com/support/excel/content/Automation/automation.asp
Using Automation with Microsoft Excel 97
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top