943,913 Members | Top Members by Rank

Ad:
Oct 20th, 2005
0

macro to make excel close

Expand Post »
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!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
grandfilth is offline Offline
16 posts
since Sep 2005
Oct 28th, 2005
0

Re: macro to make excel close

Why not make it read only?

Check the switches section of VBA -
I believe it's the app.close or END command
Reputation Points: 13
Solved Threads: 4
Junior Poster
Kegtapper is offline Offline
115 posts
since Oct 2005
Oct 28th, 2005
0

Re: macro to make excel close

no so that it's just my program that's in view...not the cell letters and numbers and tool bars and stuff...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
grandfilth is offline Offline
16 posts
since Sep 2005
Oct 29th, 2005
0

Re: macro to make excel close

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.
Reputation Points: 13
Solved Threads: 4
Junior Poster
Kegtapper is offline Offline
115 posts
since Oct 2005
Oct 29th, 2005
0

Re: macro to make excel close

how do you go about setting up one of these userforms? Thanks so much for this help
Reputation Points: 10
Solved Threads: 0
Newbie Poster
grandfilth is offline Offline
16 posts
since Sep 2005
Nov 2nd, 2005
0

Re: macro to make excel close

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
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. set xapp = CreateObject("Excel.Application")
  2. xapp.Visible = True
  3.  
  4. ' Make a new Excel workbook:
  5. set workbook = xapp.Workbooks.Add
  6. 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:
http://msdn.microsoft.com/library/de...ectmethods.asp

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.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How to make Excel disappear!!
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: pls help me





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC