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?
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?
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"?
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.
I've created a UserForm which the user exclusively uses to interact with a workbook.
The problem is, if the user opens another workbook, it will open in the same Excel "Process" or "Instance" and the user would have to close the UserForm in order to use the other workbook they opened.
In VBA or some obscure application setting, is there a way to force workbooks to open in a new Excel Process (or new "Instance" of Excel)?
Another possibility would be to code something in the UserForm workbook that, on Workbook Open, would start a new separate Excel process....if that's even possible (can VBA execute a system shortcut or system command string?).
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.
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?
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.
Code added for protection but not working:
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?
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.
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.)
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.
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?
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")
the system i'm creating involves many user ... some may know how to decode the system esp. on the startup ... if they click disable macro they can view, edit and delete important data in the system ... can somebody guide me on how to automatically enables macro on excel file on startup???
I've tried: - setting security to low - but got auto reset by administrator.
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.
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.
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)
I have a VBA method that goes thru and calculates a bunch of stuff and puts this calculated info into a static data structure. This method is called 'setProjectInfo()'. This method is reliant on values on my worksheets, So as the user makes changes to the worksheet, I want setProjectInfo() to get called so it refreshes the data structure with updated information. I then have a bunch of helper methods to access different parts of this data structure. These helper methods are used in the formulae of a bunch of cells on a worksheet (ie '=getPercentComplete(period)', etc, etc).
This is all working well except for one thing. Sometimes the helper methods get called BEFORE setProjectInfo() gets called.. So, the helper methods return stale information. I can only get around this by manually recalculating the spreadsheet again. setProjectInfo() does enough stuff and takes a long enough time that I don't want to have to call it at the top of each helper method.
I've put the call to setProjectInfo() in a cell formula at the top of the my spreadsheet in hopes that Excel would know enough to call it first.. But that does not seem to work. Net, how can I get VBA to always call setProjectInfo() BEFORE it calls any other VBA methods?
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?