If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > conflict between auto save&close macro and show/hide sheets macro

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-19-09, 11:37
alexandruc alexandruc is offline
Registered User
 
Join Date: Oct 2009
Posts: 1
conflict between auto save&close macro and show/hide sheets macro

Hello

I am trying to make a save&close workbook macro.

I found several examples on google, but unfortunatly it conflicts with another macro I use for forceing users to enable macros (hide all sheets except one if macros are disabled).

The attached file is an example contaning the save&close code and the show/hide sheets depending on macros enabled (change .txt to .xls).

If the file is opened with macros disabled then only one sheet will be visible.
If the file is opened with macros enabled other sheets are visible.

The problem if that this code uses a custom save, witch makes the save&close not save... (in module1 and in ThisWorkbook)

The pourpose of the save&close is to make sure some users don't forget the excel open and thus block access to it. So if a certain idle time passes excel has to save and close without any confirmation messages.

Can anyone please help me adjust the code in the attached file so that it saves before auto closing?

Thank you

p.s: I raised the same problem with no success so far here:
http://www.excelforum.com/excel-prog...ets-macro.html
here:
http://www.thecodecage.com/forumz/me...ets-macro.html
and here:
http://www.mrexcel.com/forum/showthread.php?t=423331
Attached Files
File Type: txt test.txt (36.0 KB, 49 views)

Last edited by alexandruc; 10-19-09 at 13:14.
Reply With Quote
  #2 (permalink)  
Old 10-20-09, 11:21
weejas weejas is offline
Registered User
 
Join Date: Sep 2006
Location: Surrey, UK
Posts: 416
Have you tried stepping through the processes? That can sometimes show where problems occur.
__________________
10% of magic is knowing something that no-one else does. The rest is misdirection.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On