Automatically Close Workbook If Macros Are Disabled

Apr 16, 2008

If a user disables macros when opening a file, is there a way to have the excel file automatically close?

View 9 Replies


ADVERTISEMENT

Macros Disabled In A Shared Workbook

Jan 17, 2007

My macros don't work when the workbook is shared. They are not stored in my personal workbook and so are available to all users. What's going on?

View 3 Replies View Related

Disabling Macros Will Close Workbook

Apr 3, 2007

First of I have a workbook, that runs several macros. All works fine. However I need to better secure the workbook. I realize that there is no guarantee on the security with excel but am hoping for something to solve the problem stated below.

When a user (with high security settings) opens the workbook in question, I would like the workbook to CLOSE out if the user chooses to disable macros when the asked by excel.

View 9 Replies View Related

Disabled Not The File Close

Sep 25, 2009

I have this code that I've sourced from the internet, i have used to disable red "X" on the top right,

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel = Not bClose

If Cancel = True Then MsgBox "Please Save your data and select File - Close from the main menu"
End Sub

but when I select File and then close .... it runs the same macro? eh? i want x's disabled not the file close ....

View 9 Replies View Related

Automatically Close Workbook If Another Opened

Oct 29, 2006

I have a workbook that automatically saves itself when it is closed without prompting the user. Now I need to make the workbook automatically close if another workbook is opened.

if my_workbook.xls is opened and you open another workbook, I need my_workbook.xls to close instantly.

View 7 Replies View Related

Automatically Close Workbook Between Times

Dec 20, 2006

I am trying to have a workbook automatically close if it is not between 8:00PM and 9:00 PM on the user's computer.

View 9 Replies View Related

Warning When Macros Are Disabled

Jun 22, 2007

How can I write a "warning" in the form of a message box that will appear if the user does not enable macros?

Also, can I have one of the buttons on this message box turn on macros?

View 9 Replies View Related

Close An Unused Workbook Automatically After A Specific Time

Apr 19, 2007

I have got a spreadsheet which is being used as a database. I would like the spreadsheet to close automatically if the user has not "touched" it for a specific amount of time (say 1hr).

2 scenarios:

a/ The user is working in Excel but with another workbook.
b/ The user has the excel spreadsheet open but is working with another application, say Word

I experimented with Workbook_WindowDeactivate but I do not know how to stop the process if the Workbook is reactivated (Maybe a DO ...LOOP calling a function returning a True/False statement on the event Workbook_WindowActivate !!). My way of thinking is the following

Workbook is deactivated
Start a timer
If the workbook is not reactivated with 1hr, save and close (no user intervention wanted)
Else stop timer
Repeat process

View 9 Replies View Related

Security Warning (Macros Have Been Disabled)

Apr 28, 2008

I was playing around with Macros on an excel file. I created a few and ran them. In the end, I didn't like the way they ran, so I deleted them all. However since I ran them in the excel file, every time I open the file it gives me a warning saying
"Macros have been disabled."

Is there any way to remove the possible Macros ties/links from my file? I know I can disable the warning, but if I just want to remove the Macros ties to my file.

View 10 Replies View Related

Edit Macro When Macros Disabled

Oct 23, 2006

I accidently put the Application.Quit command in the wrong place. Now Excel closes immediately when the macro executes. I can get into Excel if I disable the macro, but then it won't let me edit the macro. Is there a way to edit my macro without executing it?

View 7 Replies View Related

Prohibiting File From Opening If Macros Are Disabled?

Feb 23, 2003

I have a file that contains Macros that I want to share with others. The only problem I have is that users have the right to enable or disable macros. If they disable the macro - some of the security functions could be lost.

Is there a way to create a macro that will not allow the file to be opened if they choose to Disable the Macros.

View 9 Replies View Related

If Macro Is Disabled: Place A Message On The Sheet Saying This Will Only Work With Macros Enabled

Aug 17, 2006

When you enable macros the sheets 2, 3, 4 ect are visible but if you disable macros, you only see sheet 1 and and you can place a message on the sheet saying this will only work with macros enabled.

View 2 Replies View Related

Compile Error On Close Of Excel 2003 But Not On Close Of Workbook

Mar 22, 2012

I am using Excel 2003.

It’s been working perfectly up until around an hour ago. However, now when I close Excel, I get compile errors.

These compile errors seem to be because Excel is trying to access controls in the workbook after it has closed. Since the workbook is closed, VBA can no longer ‘see’ the controls, and therefore it thows up errors.

I’m also getting a similar error on a Worksheets("DataExplorer").unprotect line, which seems to be because the worksheet isn’t there after closing.

These errors only occur when I close the whole excel application using the big cross in the top right. If I just close the workbook (using the smaller cross just below the big cross in the top right of excel), it doesn’t throw up these errors.

Just to clarify: all of the code runs perfectly when Excel is open. The errors are being thrown up for lines of code which run without problem until Excel is closed.

View 9 Replies View Related

Track Changes Disabled On Network Workbook

Jul 31, 2006

when i put a file across a network, it should be shared among all the users, but it appears as read only file and the option of track changes in the tools function is disabled. However, when i open an excel file in a stand alone pc, and use the track changes option, i get the file as (shared) as the header. what is the significane or meaning of this word "shared" in a stand alone pc?

View 2 Replies View Related

Disabled "Delete" For One Workbook Turned Out To Be Applied To Every Workbook...

Jul 13, 2009

I wanted to disable the function "Delete" when right-clicking on worksheets.

I copy paste the following VBA code in every sheet code :

View 10 Replies View Related

Share Workbook Option Disabled – Can’t Share Workbook

Mar 26, 2008

I have a large worksheet that for some reason I can’t share.

-It does not have any lists, that I know of, do not know how to see if there are any
-It does have validation, but I have other workbooks with listed validation that are shareable
-It is not protected
-Does not have any named ranges
-Is not read only
-I have saved it as another file name and no luck there
-I have copied the one sheet I really need into a separate file to try that it did not work,

View 2 Replies View Related

Refresh All Queries On Workbook Open When Finished Print To PDF Then Close Workbook

Jan 23, 2014

I have data that daily needs to be refreshed and printed to pdf.

I figure the simplest way to do this would be to task schedule the workbook to open daily. Then on open it will refresh the data, print it after all data has been refreshed and close the workbook.

I set it up originally without the need to print so I have all the queries set to refresh when opening the file, however when I now try and put the code to print to pdf on the workbook open event it runs before the queries are finished running. (Query notes: queries were created through Microsoft query, and are accessing a MySQL database queries set to refresh when opening the file queries set to enable background refresh).

View 4 Replies View Related

Close And Reopen Workbook From Macro Stored Inside Workbook

Mar 30, 2007

I have a Macro that is stored in a specific workbook,"Projection Modeler.xls" the last line performed in this macro is the close workbooks without saving chages(this needs to be done due to the way this macro was written, and it would take too long to rewrite). If I would then like to reopen this workbook, and then rerun this macro, can I do this from inside the current macro (in a new sub routine, for instance), or do I have to write a macro outside of the workbook and then open the workbook and call the routine?

View 4 Replies View Related

Macro Button Disabled When Workbook Date / Time Created Different Or More Than Time Set

Mar 7, 2014

I have a workbook with macro button to run some vba, if i want the button to disable when the user make copies of the workbook (date created is later than original wb saved time) what codes to add in the VBA?

what i assume is to add the time to a cell when the wb is saved, when the wb opens, it check for that cell if the same with the date created, if different, then disable the macro button.

View 9 Replies View Related

Excel 2010 :: Close Second Workbook From Workbook BeforeClose?

May 27, 2014

I cannot make this work in XL2010.

I am opening a second workbook in ReadOnly in the Workbook Open and Closing it in the Workbook BeforeClose.

I don't EVER want to save changes on either workbook.

I need to leave excel open as the macro created a 3rd workbook which the user will need.

[Code]....

View 6 Replies View Related

Copy Range To New Workbook & Close Existing Workbook

Jun 30, 2008

I have a very brief question

dlgAnswer = Application.Dialogs(xlDialogOpen).Show
Selection.Copy
Windows("Derivative YK pricing Mod G.xls").Activate
Columns("B:B").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Range("C5").Select
Application.CutCopyMode = False
Windows("EXPORT1.xls").Activate
ActiveWindow.Close

As you can see, I open a workbook with the dlgAnswer, I was wondering how I could close that opened workbook

Currently I have

Windows("EXPORT1.xls").Activate
ActiveWindow.Close

however the workbook will not always be called export1.xls, I want it to close whichever one I opened earlier.

View 9 Replies View Related

Automatically Close File And Save Changes With A New Name

Jun 13, 2009

I am trying to fix is that I have two computers networked together both with multiple users all with access to the report form that I am using which is in the shared file. If I have been working on it (I am still trying to do improvements when I have time), and I have to leave for a fire or forget to close the report, no one can access it other than with read-only.

My idea was to run some type of code that either when the screen saver comes on or after so much time with no activity, it would close and save the file with a new file name(just in case I don't want the changes that I have made in the code or something).

View 3 Replies View Related

Automatically Open And Close All Groupings?

Apr 10, 2014

Is there a way to automatically open or close all grouped rows on a specific worksheet or for specific rows?

View 5 Replies View Related

How To Delete Another WorkBook Macros Using Macros

Jul 23, 2005

What is the commands or script for deleting a macro automatically using
another workbook macro.

View 9 Replies View Related

Automatically Close UserForm After Time Period

Feb 15, 2010

I have the following code in a simple userform containing only a label:


Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub UserForm_Activate()
DoEvents
Sleep 4000
Unload Me
End Sub

When I invoke this as a single macro in a blank workbook and immediately change focus by pressing ALT+TAB to enter NotePad the userform is shown and exits normally after 4 seconds.

However, when I issue this code from within a larger macro, and hit ALT+TAB to Notepad, the excel application hangs on the displayed userform until I click back into Excel.

If required, I can happily send you the code as an attachment.

View 9 Replies View Related

Automatically Close If A User Is Inactive For A Period Of Time.

Nov 13, 2008

We have one shared excel workbook and it is used by many people (more than 20 simultaneously), is there any way to auto save & close the workbook (session) if a user is inactive for specified time.

View 2 Replies View Related

Automatically Open, Copy, And Close Multiple Workbooks

Jul 26, 2006

I have 77 excel workbooks that are created each week, they are all in the same directory. I have to open each one and copy the data into a single workbook. The file names change slightly each week.

example: DIST_91124_GROWTH_PRODUCT XXX _07072006.xls The 07072006 is the week ending date and will change. Each of the 77 files has a different DIST_number.

Is there a way to automate this process, it takes me about 4 hours to do it manually.

View 9 Replies View Related

Automatically Running Macros

Dec 6, 2006

I have a macro created that at the mo is assigned to a button. But I would like the macro to run as soon as the spreadsheet is opened.

View 9 Replies View Related

Copy Macros From Personal Macro Workbook To New Workbook?

Mar 28, 2014

I need to copy several macros from the Personal Macro workbook to a new workbook that I need to take to another computer. I need to be able to run the macros on that computer. I can only record macros and make minor changes in the VB editor. I do not know VB code.

View 5 Replies View Related

Make Workbook Code/Macros Unique To Workbook

Sep 12, 2006

How is code or functions kept unique to a workbook? for instance i create a few toolbars that are relevant to "work book 1", however when i open another workbook "2" the toolbars do not function properly or are removed by the opening/closing of the work book, similarly other macros seem to struggle with more than one workbbok open at a time.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved