Workbook To Open Only If Macros Are Enabled

Mar 29, 2009

I have created an Excel Workbook and this Workbook has a VBA code that enforces an expiry date of the workbook (TimeBomb from cpearson.com). So, if the expiry date has passed, the workbook will not open. But since it is VBA related, the expiry date will work only if one has enabled macros. If macros are disabled, the workbook will open regardless of the date.

So, is there a way for Excel to check if macros are enabled? and is there a way for Excel not to open the workbook, if the macros are disabled?

View 10 Replies


ADVERTISEMENT

Force Macros Enabled On Workbook Open?

Oct 28, 2013

I'm posting a workbook on our network that I want to enable users to go in and update. I have the workbook designed, with entry fields for the data they need to enter, and they then push "Submit" to submit the new data to a hidden tracking log within the workbook.

Many of the users will be complete Excel newbies, and although I haven't posted the workbook yet, I am trying to anticipate possible issues. The first that comes to mind is that the user opening the workbook may not have macros enabled in their version of Excel, and they will get a message, and can't perform the udpate. Is there a way to add a Workbook Open event that automatically enable macros in the workbook when they open it, even if it is for this workbook only?

View 5 Replies View Related

Workbook Protection Code: When Macros Are Not Enabled

Oct 23, 2006

I prtected several sheets with the xlVeryHidden command I got from you. But when the user does not allow Macros to be executed, also these protections are not executed. Does there exist any solution to this problem? Something like "when macros are not allowed do NOT open file"?

Sub workbook_open()
Application.DisplayAlerts = False
Application. ScreenUpdating = False
Application.AskToUpdateLinks = False
Windows("rechenfile.xls").Activate
Sheets("Daten").Visible = xlVeryHidden
Sheets("Koeffizient").Visible = xlVeryHidden
Sheets("Investitionen").Visible = xlVeryHidden
Sheets("Konsum").Visible = xlVeryHidden
Sheets("Zinssatz_permanent").Visible = xlVeryHidden
Sheets("Preise").Visible = xlVeryHidden
Sheets("Nettotransfers").Visible = xlVeryHidden
Sheets("Beschäftigung").Visible = xlVeryHidden
Sheets("Löhne").Visible = xlVeryHidden
Sheets("Nettoexporte").Visible = xlVeryHidden
End Sub

View 4 Replies View Related

Workbook Hangs When Opened With Macros Enabled

Jan 30, 2008

I have been working on an excel spreadsheet and have come acrss this problem once before too. When I try to open this file it hangs and does not respond. the file size is not too big (490KB). When I disable macros i can open the same file but when the macro are enabled, it hangs. have been trying to look for a solution but just dont know what to do.

View 3 Replies View Related

Determining If Macros Are Enabled

Jul 8, 2006

How can I determine if the user selected "disable" at the initial macro prompt screen.

Basically, I would like a formula/function that can say whether Macros are switched on or off by the user.

View 9 Replies View Related

Excel 2007 :: Macros Enabled But Will Not Run?

Oct 27, 2010

I have an excel file saved as macro-enabled that is perfectly functional and can be opened on my computer (via Security Warning - Enable Macros). The file is saved on another computer, through which I am accessing by a network.

This other computer is unable to run the macros, and when we open the file in excel there is no security warning that pops up (like there is on my computer). I have gone to the Excel Options and entered the trust center settings, and finally the Macro Settings. It is set at Disable all macros with notification. (same for both computers... but on one of the computers there is no security warning that pops up)

We tried enabling all macros (temporarily) and tried re-opening the file and running a macro. We got an error message saying that macros were not enabled.

We also made the file a trusted location and saw no changes.

View 7 Replies View Related

How To Use Data Validation If Macros Are Not Enabled

Sep 8, 2012

I want to use data validation so that if macros are not enabled, data validation in a particular cell will not allow any entry. Maybe a helper cell that is TRUE if macros have been enabled? How is this done?

View 2 Replies View Related

Macros Enabled Spreadsheet With Protection

Feb 4, 2014

I would like to be able to password protect each sheet in a workbook and still be able to use the macros/form control (button). Below is the code that I'm using and the code that I've attempted to add to it to protect it.

Current Code:

[Code] ....

Code added for protection but not working:

[Code] ....

I've added this code to both the beginning and the end of my code; however, I'm getting a "400" error when I try to use the form control (button) when the sheet is protected. Is there something that I'm doing incorrectly?

View 6 Replies View Related

Warning Page If Macros Aren't Enabled

Jun 10, 2008

I'm making a little calculator thing for some of my colleagues, and I've created a warning sheet at the front in case their macro security is set to high or they disable macros.

The thing is, when the workbook is opened with macros enabled, and when it's closed, this warning sheet flashes briefly. Is there any way to avoid this?

My code is:

Private Sub Workbook_Open()
Worksheets("Form").Visible = True
Worksheets("Form").Activate
Worksheets("Enable macros").Visible = False
UserForm1.Show
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
Worksheets("Enable Macros").Visible = True
Worksheets("Form").Visible = False
Me.Save
Application.ScreenUpdating = True
End Sub

View 9 Replies View Related

Don't Open Or Use Workbook Unless Macros Are Turned On?

Dec 9, 2008

Is there a way to prevent a workbook from opening unless macros are allowed?

View 2 Replies View Related

Can't Open An Excel Workbook With Macros

Nov 2, 2008

My son just upgraded my computer from 2000 to xp - a new application on a new hard drive. in the process, Excel was upgraded from 97 SR-1 to 97 SR-2.

My checkbook is on excel, and I really need to open it! We just moved to a new location, with the typical problems with email, internet etc.

I can open workbooks without macros. But I cannot open any with macros.

I get this message:
"Could not register the Visual Basic environment."

When that window is closed, the next one says:
"An error occured when initializing the VBA libraries (126)"

View 9 Replies View Related

Open Workbook, Disable Macros

Apr 22, 2006

Is it possible to open a workbook via vba, but disable the macros? I know this sounds strange, but the workbook is coded to prevent users from saving it, and the only way to save it is to either open it with macros disabled or change the variable OKtoSave to true, but the variable is global only to the sheet and I can't find a way to change it through a macro written in my personal.xls workbook.

View 5 Replies View Related

Hide Picture By Default, Display If Macros Enabled

Apr 7, 2008

Basically, I want cell A1 to display the message "Macros must be enabled for this document to display properly", then have that text replaced with a picture (jpeg logo) if macros are enabled. I know I need to put the code in the Workbook_Open sub, but I keep getting the "error 1004, cannot modify visible property of picture object" when I try to tinker with "visible = true".

*EDIT* - The picture must be embedded in the spreadsheet somehow, and hidden from view when macros are disabled. (Having the picture crammed into a single cell at IV65536 is fine.)

Thoughts?

View 10 Replies View Related

Excel 2007 :: Macros Enabled But Record Macro Grayed Out

Apr 14, 2008

I have excel 2007 and I want to record a macro. I have enabled all macros via the Trust Center settings and have even saved the current workbook (created from scratch in 2007) to a macro-enabled version.

But when I click on the 'developer' toolbar, 'record macro' is grayed out.

View 9 Replies View Related

Open A Workbook And Run 1 Of 4 Macros Based On 3 Cell Values

Jul 30, 2009

I'd like to automatically run 1 of 4 macros depending on some criteria. Every workbook created has, unfortunately, the same worksheet name, so that leaves the only differences between the 4 possible loaded workbooks in the cells area and even those can be similiar in many ways. But....I found some criteria to separate all 4 workbooks...Here they are...

run macro 1 if this

1. Worksheet name says "Screen"
2. Cell H1 has the word "Lead"


run macro 2 if this

1. Worksheet name says "Screen"
2. Cell B1 has the word "records" somewhere in the cell
3. Cell H1 has the word "Lead"


run macro 3 if this

1. Worksheet name says "Screen"
2. Cell B1 has the word "records" somewhere in the cell
3. Cell N2 has the word "Delivered"

run macro 4 if this

1. Worksheet name says "Screen"
2. Cell B1 has the word "records" somewhere in the cell
3. Cell N2 has the word "Bevel"

I don't know if this can be done, but if so, that would be fantastic! I'm thinking that the macro would have to be "global" and in the user's personal workbook?

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

Prompt User To Open Sheet As Macro Enabled - VBA

Jun 19, 2013

I have got a protected sheet with macros, how can I ensure that users can only open the sheet as Macro enabled only otherwise the sheet would not open?

I understand that some users may have different Macro security settings?

View 1 Replies View Related

IPad APP Which Can Open Macro-Enabled Microsoft Excel Files

Jun 20, 2012

I am looking for an IPad App which can open Macro-Enabled Microsoft Excel Files.

View 1 Replies View Related

Save Workbook As Macro Enabled Workbook By VBA

Jan 23, 2012

the following scenario.

I am using the following code to save a workbook as a macro enable workbook on the selected path as today's date. But it is being saved as a macro free workbook.

Below is the code in module:

Sub save_file()
Dim tDate As String
Dim FileSaveName As String
Dim fPath As String
tDate = VBA.Format(DateSerial(Year(Date), Month(Date), Day(Date)), "dd-mm-yyyy")
'FileSaveName = Application.GetSaveAsFilename(InitialFileName:=tDate, filefilter:="Excel Files(*.xlsm),*.xlsm", Title:="Please save the file")

[Code]...

View 4 Replies View Related

Macro Enabled Workbook IOS App?

Dec 5, 2013

Is it possible to have a macro-enabled workbook to work on ios software(iphone or ipad app)? Currently I cant find any spreadsheet app that will let you have a macro enabled workbook. The code from the posts below would be great if they worked on my phone or ipad.

Scan barcode to excel with date & time stamp in & out.

View 4 Replies View Related

Protecting Macro-Enabled Workbook

Apr 29, 2012

is it possible to protect a macro-enabled workbook with password.

View 5 Replies View Related

Hide Toolbars When Workbook Protection Is Enabled

Jun 26, 2006

I would like to hide the standard and formatting toolbars in excel when i enable workbook protection, however I have no idea how to get excel to realise when workbook protection has been enabled, and how to hide the toolbars in VBA also. Also i would like to know how to do the reverse (how to show tooldbars when workbook protection has been disabled)

View 3 Replies View Related

Save Sheet As Macro Enabled Workbook Using Codes

Jan 28, 2014

Working with a macro enabled workbook that has many sheets what would be a good code that would save Sheet1 into a new MACRO enabled workbook so that the 'Buttons' (which are linked to macros) on this specific sheet will be the only macros that will be copied to the new workbook as opposed to the rest of the macros that are found in different sheets?

Here is what I g=have:

[Code] ......

View 11 Replies View Related

File Format Equals Marco-Enabled Workbook

Feb 5, 2009

I want to save the Excel file as "Excel Macro-Enabled Workbook." Currently, File Format:=xlNormal within the VBA code and the results saves the Excel file as .xls. How do I write the File Format to save the Excel file as "Excel Macro-Enabled Workbook."

Below is an example:

ActiveWorkbook.SaveAs Filename:=Left$(ActiveWorkbook.Name, (Len(ActiveWorkbook.Name) - 4)), FileFormat:=xlNormal, CreateBackup:=False

View 2 Replies View Related

Create Username And Password To Login Into A Macro Enabled Workbook

Jan 3, 2011

I need a macro ie when a user opens a macro enabled workbook,he should be asked for a username and password to access workbook. Administrator should have right to create users with reset password rights

View 5 Replies View Related

Protect Micro Enabled Workbook Being Copied On External Memory

May 14, 2012

I have this micro enabled workbook and I want to protect it from being copied on other sources.

View 1 Replies View Related

Prompt Open Closed Workbook Then Copy Range And Paste Special Into Open Workbook

Apr 6, 2013

I have created a spreadsheet some time ago and have been asked to improve on it but I'm rusty with VBA.

I have an automated ordering system that saves each sent order as the date e.g "05-04-2013.xls" but the management team want a graph with the data for the last 4 weeks compared. I have created a seperate workbook called "consumables report.xls" which has a column with the products listed followed by columns "Quantity" and "cost" which is repeated for the 4 weeks of the month.

I want to add a button to prompt the user to choose the saved order e.g "05-04-2013.xls" (all orders saved in same directory) to copy and paste the quantity and cost columns (c8,D69) into "consumables report.xls". I got this to work earlier but it would only paste the formulas and not the values. So I need

A prompt to open workbook
Copy range (c8,d69)
Close work sheet
Paste special .value (c8,D69)

I dont care if it has to open the workbook to copy the data as this will only be used once a month so it dosnt matter how slow the code is.

week 1 week 2 week 3 week 4
Product
quantity
cost
quantity
cost
cost
quantity
cost

1
2
3
4
5
6
7
8

View 7 Replies View Related

Make Workbook Open- Open Correct Month Workbook

Jul 8, 2006

I have Monthly sales sheets that import my cash register data into them. I wanted to set them up to do everything without being there. So I have my task manager open excel at 9:30pm everyday and it runs the macro to import the data into the correct day of the month. Here is the workbook

open macro-

Private Sub Workbook_Open()
Dim dTime As Date
dTime = Time
If dTime >= TimeValue("9:30 PM") And _
dTime < TimeValue("9:40 PM") Then
ImportData
End If
End Sub

This is in my July spreadsheet only. So is there a way to make it know which month spreadsheet to open on the 1st of the month? So come August 1st it will automatically open the August workbook and input the data for the first day? By using the date?

View 9 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 Open New Workbook After 1st Workbook Open 4 Seconds

Nov 6, 2009

I have a presentation that I open from a short-cut. After the "Welcome Page" is opened, I want to open a second workbook in a new instance of Excel after 4 seconds.

I think that I can open the new instance of excel, but I don't know how to activate the macro after 4 seconds.

I'm sure there is a function someplace for this that can be used in a macro.

Then, after the second Workbook is opened, I want the Welcome Page "Workbook" closed, leaving the second Worbook open.

View 14 Replies View Related







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