If Macros Are Diabled At Security Prompt, How To Prevent Workbook From Opening

Dec 15, 2008

I am relying on macros for a lot of functionality and security.

Is there a way to stop a spreadsheet from being opened/accessed if a user disables macros at the security prompt?

View 9 Replies


ADVERTISEMENT

Security Prompt Even After Deleting Macros Using VBA Code

Jun 27, 2007

I have used the following Macro that deletes the Macro code. It then saves the file and quits excel.

*************************************
Sub removeAllCode()
Dim awi
Dim awcl As Integer
Dim count As Integer
Dim i As Integer 'loop counter
On Error Resume Next
count = ActiveWorkbook.VBProject.VBComponents.count
For i = 1 To count
Set awi = ActiveWorkbook.VBProject.VBComponents.Item(i)
awcl = awi.CodeModule.CountOfLines
awi.CodeModule.DeleteLines 1, awcl
Next i
Set awi = Nothing
ThisWorkbook.Save
Application.Quit
End Sub
*************************************

However when I open the Excel File, I still get the Macro Prompt. I have checked in Macro list as well as in VB Editor and no Macro code exists

If I have the file manually (or do a save as) and then reopen the file, I no longer get the Macro prompt.

I have tried various examples listed in different forums/sites but nothing works.

View 9 Replies View Related

Security Warning About Macros When Opening 2003 File

Mar 3, 2009

I'm using Excel 2003 and recently when I open a file, it prompts out a Security Warning message about Marcros which at the end contains 3 choices: Disable Macros, Enable Macros, and More Info. I then click Enable Macros to open the file. Once open, I go to Tools > Marco > Run Marco (Alt+F8). A Macro box prompt out but the Macro list is empty. I try different choice inside the pull down menu "Macros in" but the Macro list is still empty.

Where can I find out the macro which triggers the warning message of Security Warning when opening the file? And how can I delete the macro if found useless.

View 7 Replies View Related

Prevent A User From Opening Another Workbook

Feb 12, 2009

How can I prevent a user from opening another workbook in an Excel session "from the outside"?

I'm fairly new to VB. I'm developing (in VB 2003) a simple but SECURE Excel environment which will allow a user to update a hidden Master_Records workbook. I need to keep the user's Excel session secure...for example, I've disabled all Excel Toolbars and Command Buttons, effectively preventing the user from doing anything except filling in some cell values and clicking on a few custom buttons in the worksheet. But how can I prevent the user from opening another workbook into the active session from his desktop and introducing some malicious code into the session via that route?

One respondent in another forum (the only one, in fact) suggested that I look into "instantiating workbook level events" so that I can detect when other workbooks are open. I'm not sure what that means, is there someone here who could give me some guidance into that solution?

View 13 Replies View Related

Prevent Workbook Opening If Other Workbook Open & VBE

Aug 29, 2006

how to prevent a workbook from opening if another excel document is open and if a visual basic window is opened.

View 8 Replies View Related

Opening Workbook Without Macros But Timing Out?

Jun 3, 2012

I'm trying to open a workbook that someone sends me once a week, and suddenly it's timing out (hourglass) and not opening.

I know for a fact that he put in some formulas (but no macros) that reference a file only he has access to.

And, auto calculation, he leaves on.

I see the file open on one of the 3 sheets in it, but the hourglass never goes away, and when I Ctrl Alt Del, it says Excel is Not Responding.

Is there any way I can get this file to open so that I can fix it or transfer the raw data to a new workbook?

View 2 Replies View Related

Autorun Macros On Opening Workbook

Mar 22, 2008

A macro to automaticlly run macros in my workbook when I schedule it to open through scheduler at a given time.

View 9 Replies View Related

Excel 2007 :: Security Notice Prompt

Apr 15, 2013

I am using excel 2007 to open files with macros embedded. Most of the time, I would receive the security notice in the ribbon but sometimes the notice would appear as a prompt as with excel 2003.

How can I set it up so I would always have the prompt instead of the message in the ribbon. The reason is that with the one in the ribbon, new users to 2007 often fail to activate the macro for the the file to work properly. With the prompt, users have to either enable or disable the macro to view the file.

View 3 Replies View Related

Code To Bypass Outlook's Security Prompt

Sep 11, 2005

when sending an email in code from Excel through Outlook, the following Microsoft Office Outlook dialog appears during code execution in Office releases since 2002:

A Program is trying to automatically send e-mail on your behalf.
Do you want to allow this?
If this is unexpected, it may be a virus and you should choose "No".

Two buttons: [Yes] [No]

Question

Has anyone used or developed code that bypasses this prompt, and if so, would you please post an example of your code here. What I would like is a macro in VBA and / or API that you know from your own first-hand experience has worked for you, that emails an Excel attachment from Excel, using Outlook (not Outlook Express) as the email client, which bypasses the above prompt.....................

View 9 Replies View Related

Enable Macros Upon Opening A Workbook And Avoid Receiving The Message

Jul 14, 2009

What is the code to enable macros upon opening a workbook and avoid receiving the message "Security Warning-Macros have been disabled" in Excel 2007?

View 3 Replies View Related

Encourage Enabling Of Macros: Disable Macros When Opening Then The Worksheet Menu Bar And Other Command Bars Are Still Available

Aug 26, 2009

I have an Excel 2003 program that contains macros. One of the macros hides certain command bars and disables the worksheet menu bar. On close the opposite is true. The problem is, if a user uses the disable macros when opening then the worksheet menu bar and other command bars are still available. I would like to hide all of the data sheets and display another sheet that would normally be hidden displaying a message that the macros have to be enabled for the program to work correctly if disable macros is chosen. When the enable macros are used I would like the Error page to be hidden.

View 6 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

Turn Off Security Warning Regarding Macros

Jun 2, 2009

I would like the security warning not to pop up when the workbook is opened. I have been able to turn it off for myself but I had someone else test it and each time it's opened the security warning pops up with the disable, enable messages. Is there a way to turn this off permanently so not matter who opens it it won't pop up?

View 9 Replies View Related

Macros Dont Work Even On Low Security

Aug 21, 2009

My dad wrote me a VB programme to save me time entering repetitive data into an excel template for my business. At first it didnt work untilll i reduced security to low. Sice then I fried my computer and have had to reformat it with a diffirent version of windows, vista service pack 3. Now even on low security it doesnt work.

The little button in the worksheet to make the macro happen isnt visible or doesnt exist.

View 13 Replies View Related

Without Prompting For Any Macros Security Message

Aug 28, 2008

i want my application which i build though VBA in excel run on every computer without prompting for any Macros security message so is there any solution?

View 9 Replies View Related

Security Alert This File Contains Encrypted Macros...

Mar 3, 2007

I just loaded Excel 2007, and then opened a workbook I wrote that made pretty extensive use of macros and code. I knew enough to first set up Excel via the "Trust Center" to allow ALL macros to run, against MS's, or more likely against MS's lawyer's, recommendations. btw, does anyone have a clue as to what "Trust access to the VBA project module" is all about? Apparently MS doesn't, for I have searched Help and the KB for it in vain. Anyway, I brought the old xls workbook in, then saved it as a macro-enabled spreadsheet, .xlsm. Then I open it, and uhg, a most distasteful surprise. Even though I specifically went in and set Excel to run all freaking macros, someone at MS has decided I am too stoooopid to make this decision, and all macros have been automatically disabled. OK, so let us click where it says "Options" on this warning bar.

A window pops up telling me that this file contains encrypted macros that have been disabled...". Do a search on that, again, MS, MS kb, even Google, and you are not going to find it (In quotes). There is ONE freaking option with a radio button now, telling me "Help protect me from unknown content" - again, I try a Google search, an MS search and an MS kb search... nothing directly addressing it; but I do the logical intuitive thing - there is a selected radio button there, so click it to unselect it. Click the idiot thing until the cows come home, darn it, it won't do a thing! I even tried an Alt-p as they have the "p" underlined - all that does is select the statement, it remains selected, tap the space bar, hit the space bar, stand on the space bar... First they disable all the macros. OK, I can live with going in and fixing that, but then deciding that I am too dumb to make that choice so don't allow me to turn them on in my own freaking code? Yes, it has been several hours and I am still pissed off beyond belief.

View 9 Replies View Related

Disable Password Prompt Upon Opening Spreadsheet

May 29, 2008

have a password protected spreadsheet with a userform for people to enter data. This allows them to enter data, but stops them from editing or deleteing data once entered.

When the spreadsheet is opened, it asks for a password to unlock it. Hitting cancel allows the user to continue and the userform pops up for the user to enter data. I would like to disable the initial password prompt when the file is opened to avoid confusion on the users part.

View 9 Replies View Related

Prompt Users To Activate Macros

Mar 27, 2008

I update an Excel file daily and save it to a server on a network. Other network users access this file from their own computers. I have a macro created that opens a dialog box upon opening that shows users know of anything important.

Since employees in the office have Excel set to Paranoid mode or something like that, they are never even prompted that macros exist and are intended to run and that they should choose to allow them to run or not.

I would like to approach the problem in a way other than asking all employees to activate all macros or to lower their Excel security settings at all times or only when opening this single document. That would be considered too inconvenient.

View 8 Replies View Related

Prevent Users Opening In WordPad

Jul 11, 2006

I know how I can protect worksheet or a group of cells, but I can not prevent any one to damage it by (open with) WORDPAD to clean or damage it then to cancel this protection!

View 4 Replies View Related

Prevent Spreadsheet From Opening When Being Updated

Jun 19, 2007

I currently have a spreadsheet that my deparment use at work. Its just a full time equivallent sheet, nothing fancy. However I added code onto it to prevent users opening it as I was updating it.

However I went to open it and It wouldnt open. It wouldn't recognise me as being the exception. Its just a code on the workbook open that says if user is "slb090" (which is me) then do nothing, else msgbox and just a quickie sayign come back later".

I have attached the spreadsheet, in the hope someone can open this for me and remove the message so I can open it!

View 3 Replies View Related

Prevent Email Code From Opening New Instance Of Outlook Every Time

Aug 28, 2013

the code always opens a new instance of Outlook even though one may already be open. If left unchecked I may have like 30 instances open if I leave the computer for a few hours. So I was wondering is there some snippet of code I can add in here to check if excel is open first and if so do not open a new instance?

Code:
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
' Change the mail address and subject in the macro before you run it.
With OutMail
.To = "xxxx@live.com"

[code].....

View 2 Replies View Related

How To Prevent Auto Macros From Running

Sep 11, 2008

I have made a vba program in excel 2003 that opens a worksheet using Workbooks.Open, and copies all the worksheets out into the program etc. The worksheets that I am opening have macros that automatically execute when the worksheet is opened (opening up some forms ). These macros are running when I open the file using VBA. How can I prevent this from happening. The automatically executed code in the workbook being opened is located in "this workbook" and can be seen below.

Private Sub Workbook_Open()
Dim CfileName As String
'Check Config sheet for template state
If Config.Cells(10, 3) = 1 Then
CustomizeDirInfo.Show
End If

If Config.Cells(10, 3) = 2 Then
GetConfData
GetGrpData
StdFileGen.Show
Else
Exit Sub
End If
End Sub

View 9 Replies View Related

Disable Macros On Opening Using Vba

Feb 22, 2007

I have created an Excel template that the company sends out to suppliers to provide us with Quotations. I've added some VB in the Before Save module to prompt the user to do certain things. The problem I have is that I run another procedure that loops through a list of data and re-formats it using the template and therefore every time it tries to save a file the Before Save prompt pops up.

View 2 Replies View Related

Security Warning When Workbook Opened

May 30, 2009

my workbook is finally working the way it should but every time i open it i get a security warning window with the options disable macros, enable macros and more info. how do i get this to not show up every time it's opened. this workbook will be used by someone other than me and i don't want them to need to do anything but open it and use it.

View 8 Replies View Related

Active Workbook Refreshall Security

Nov 4, 2008

I have a function that is called in Access vba code that refreshes all sheets in a given workbook. We use it all the time for workbooks containing any number of tabs to be refreshed. The code has a key line: ActiveWroksheet.Refreshall. I need to now start to secure the pivot so the user can not refresh it. Another post pointed me towards: .PivotCache.EnableRefresh = False.

This apparently can only be used for a particular sheet; ie it can not be applied to ALL sheets in the workbook. The trouble is the function is generically used to refresh any workbook, and the number of sheets may vary.

Any thoughts on how I can disable the ability to refresh a pivot for ALL sheets. I'd prefer not to turn off the pivot wizard since the user should be allowed to manipulate it...just not refresh it.

View 9 Replies View Related

Enabling Macros Without Re-opening Worksheet

Aug 25, 2006

if you open a workbook & choose not to enable macros, is there any way to later change your mind & set macros to enabled without having to close & reopen the workbook?

View 9 Replies View Related

Real Security For Excel - Protect Workbook

Oct 5, 2013

I have a workbook which i really want to protect. I don't want any formulas to be seen and tampered with.

Simply hiding/locking cells and protecting the sheet is not secure enough. within minutes of googling crack password, i was able to find a macro that unlocks the sheet.

Is there something out there that can really secure your workbook. I found something called XLS Padlock [URL].... seems great.

View 2 Replies View Related

Opening A File Without Opening A Workbook

Apr 17, 2007

I have a need to open a file from my companies intranet. My current method was to open said file via the method that the recorder gave me. However, I would like ot be able to open a said file without having to start open another workbook.

This is the path:
[url]

So the command is this:
Workbooks.Open [url]

Links are not actual links

So what I need to know. Is how can I open this file without opening a workbook. I haven't been able to use the VB "Open Statement" to open a file and I don't believe that I've been successfull using the Filesystem object either.

View 9 Replies View Related

Prevent Editing After Date And Force Enable Macros

Apr 7, 2014

So I have a Workbook that I want to make read-only/protect after a certain date. I also want to force the user to have macros enabled. So far I have the following script, but despite changing it to read-only it doesn't seem to do anything. I have also tried to enable protection on the sheets after that date, but am getting errors.

View 2 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







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