I've been trying to create a macro which closes excel without the save pop-up coming up, anyone got any ideas? I don't want it to save, this is because i don't want anyone who uses it to muck it up!

11 Years
Discussion Span
Last Post by Comatose

Why not make it read only?

Check the switches section of VBA -
I believe it's the app.close or END command


no so that it's just my program that's in view...not the cell letters and numbers and tool bars and stuff...


ummm that's not closing Excel. I think what you are trying to do is to create a form. With no tool bars, and limited controls for users.

If that is the case you will need a USERFORM. So that Users only see the information and cannnot modify the Rows/Colums.

Pressing ALT F11 will still take you to the VBA editor, and you should see your macro you already created.


how do you go about setting up one of these userforms? Thanks so much for this help


Look Into The Excel Object. You can create/Manipulate excel documents with a VB Program (even with WSH alone) by using these objects. An Example

set xapp = CreateObject("Excel.Application")
xapp.Visible = True

' Make a new Excel workbook:
set workbook = xapp.Workbooks.Add
set worksheet = workbook.Worksheets("sheet1")

Basically, It just shows you HOW to work with it in VB. If you Google VB6 Excel.Application, Google will give you a whole lot of information on it. You can also read up on the excel object straight from the horses' mouth:

This way, you can work with the excel document (the cells, and everything) without ever having to set it's visible property to true (meaning, it stays hidden). Let me know what you come up with though.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.