macro to make excel close

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2005
Posts: 16
Reputation: grandfilth is an unknown quantity at this point 
Solved Threads: 0
grandfilth grandfilth is offline Offline
Newbie Poster

macro to make excel close

 
0
  #1
Oct 20th, 2005
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!
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 113
Reputation: Kegtapper is an unknown quantity at this point 
Solved Threads: 4
Kegtapper's Avatar
Kegtapper Kegtapper is offline Offline
Junior Poster

Re: macro to make excel close

 
0
  #2
Oct 28th, 2005
Why not make it read only?

Check the switches section of VBA -
I believe it's the app.close or END command
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 16
Reputation: grandfilth is an unknown quantity at this point 
Solved Threads: 0
grandfilth grandfilth is offline Offline
Newbie Poster

Re: macro to make excel close

 
0
  #3
Oct 28th, 2005
no so that it's just my program that's in view...not the cell letters and numbers and tool bars and stuff...
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 113
Reputation: Kegtapper is an unknown quantity at this point 
Solved Threads: 4
Kegtapper's Avatar
Kegtapper Kegtapper is offline Offline
Junior Poster

Re: macro to make excel close

 
0
  #4
Oct 29th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 16
Reputation: grandfilth is an unknown quantity at this point 
Solved Threads: 0
grandfilth grandfilth is offline Offline
Newbie Poster

Re: macro to make excel close

 
0
  #5
Oct 29th, 2005
how do you go about setting up one of these userforms? Thanks so much for this help
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: macro to make excel close

 
0
  #6
Nov 2nd, 2005
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC