I have created a spreadsheet containing about 30+ macros and then copied it with a new title eg, sheet2013.xlsm (original) and sheet2014.xlsm. My problem is that every time I open the 2014 sheet it re-connects to the macros in the 2013 sheet (if this makes any sense). Is there a way to lock macros to a spreadsheet, ie open both sheets and use the macros within those sheets?
If you look at the file I attached you will see the tabs at the bottom are months of the year. I know how copy a sheet but every time I make a new month tab I have to retype the month in the top left corner of the table, in the tab, and other places. This gets really repetitive when I have to do this for literally around 20 other spreadsheets like this.
What I'd like is a way to create new month tabs that automatically rename the month and year in chronological order on the sheet and tab if possible. 2 months it's because I'm constantly having to tweak spreadsheets for my boss. It'd be pointless to go ahead and make a template because then I'd have to go back and change the code for every month. So I just create tabs and edit code month by month.
I've created an Add-in (.xlam file) in Excel 2007 and installed and activated it (it shows up under "Active Application Add-ins" on the Add-in menu for new workbooks). I can see the macros and code when I go to the VBA editor, but the macros don't show up in the regular macro list.
I know that I can write code for the new workbook that will reference the Add-in code, but I want other users to be able to install the add-in and run the macros in it right away without any knowledge of VBA. Is there a way to make this possible?
I have a spreadsheet that I have a lot of macros that are attached to a customized toolbar saved in the same spreadsheet. I saved this is a read-only file. When I open as read-only and run my macros (testing), I save it as another file. When I then open the "template" to do the same thing, the toolbar/buttons now reference the file I previously saved as something else. Help please? Is there a macro that would delete all macros before saving the file as something else?
I built what I can only describe as a fantastic spreadsheet. It wasn't until after that I realized it is 123 MB in size, but even for the complexities within it, it still feels like that is quite large.
I can't share the file due to proprietary reasons, but any general tips as to things I can do to make it smaller (and therefore faster to run).
I tried saving it as a binary spreadsheet and that dropped it to about 80 MB, but I don't really know what that does and if it will impact the sheet performance in any way.
I have a 30 in monitor (I know I'm lucky!) but when I open a new spreadsheet it opens all the way across the screen 100 columns and 100 rows. How can I change the size when it opens?
I am making a 'sports day' spreadsheet for a project and i have one problem, the spread sheet is meant to have the possiblitlity of mistakes reduced to a minimum.
I have 6 teams in the sports day and under each i put 1st, 2nd,3rd,4th,5th,6th.
[url]
basically i need the rows to only accept 1st 2nd 3rd..... only once. I need something like an error message to come up if a value is entered twice on a row.
I am working on a macro that copies tabs from the spreadsheet the macro (button) is located in, creates a new book for them, and then pastes values so that no formulas still exist. The problem I am having is with named ranges. The named ranges do not reference the new sheet, but rather the old spreadsheet. This is fine because the new file is solely for presentation, however, one macro (which selects print ranges based on user selected checkboxes) tries to reference the old spreadsheet once it runs. I would like the macro that I currently have working, to also make this macro in the NEW spreadsheet so that it can still highlight the correct print area when used. The macro does not reference the name of the workbook at any point, it is purely "Range("ai10") type references so I don't understand why it is trying to open the old sheet back up.
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?
I'm not sure if this is something that can be done by macro, I have a database setup using a spreadsheet in Excel. The first column is a list of customer names, that can be filtered by customer name. If I filter the column, using for example the name Jones, is there a way to add up all the units of the product that they have purchased?
I used the "Call" command instead of "Run." Everything finally worked perfect!! Being new to VBA I do not know the reason behind the "Run" command being different and causing my problems. BUT "call" sure is the answer to my recent irritations.
After I got the darn things to finally work, I decided to do the responsible thing and use Option Explicit, which helped me clean up my code tremendously!!
I have 3 macros, 2 of them puts formulas in 2 separate cells and the other to turn off file save, file save as and the Save button. Everything was working fine until I password protected the project, now the macros quit loading. I can still run them manually and they work fine, they just don't run when the spreadsheet is loaded. (What I wanted to do was prevent users from seeing the formulas by saving the spreadsheet after the formula was put in the cell and also by looking at the macro). I've unpassword protected the project and took out the macro to prevent the Saves. What do I need to look at to get the macros to run when the spreadsheet is loaded?
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.
I have a label which I print from excel and I print multiple copies of the same label.
I need the number of copies printed on the label also such as 1/20 ,2/20. I found a good macro on this site but i can't get it print 1 of 2, 2 of 2. Can anyone help me?
Sub PrintMany() Dim i As Long For i = 1 To 20 'change 20 to number needed Range("A1").Value = i ActiveSheet.PrintOut Next i End Sub
I have a user that keeps a maintenance log in an Excel worksheet and sends an updated copy once a week to a board member. Two weeks ago, the board member started complaining that he was prompted to enable/disable macros on opening and became worried when my user stated that no macros were used in the book. He is now concerned that we have sent him a virus.
I know the file is clean because I've scanned it, and when I look at the file in VB, there are no modules or classes present just the Sheets 1-3 and the ThisWorkbook file. None of these objects have any code in them. My user does have some macros in PERSONAL.XLS but they are not used in the workbook in question.
No one else gets the prompt for enabling/disabling macros. Even if I set my security to prompt for any macros, I get no message. I'm convinced that there must be some setting in his Excel that is causing this individual to get this message. Is there anything else other than a macro that would cause this?
I have a sheet which is a basically my template, it has a bunch of formulas etc on it
I need to create about 200 copies of this exact sheet and its formatting etc, is there anyway you can bulk copy a worksheet or does this need to be done individually?
I have 5 opened files. I have copied into those files a set of formulas from my master sheet (with the macro). In A3 of ALL the open files, there is a date (ex. Date: 1/4/2014) Based on that date I want to copy the result of what I copied into the files (below is the code that I used to copy into the open files, maybe I could add something to create a named range of the resulting paste) back into the master sheet into a tab called 2014 and into a cell two cells below the cell in row 12 with the MATCHING date.
Question 1) Is there a way that whenever I select Cell B39 that it will copy cells B39:V39 ? From there I can manually paste that selection to where I need to.
If this is possible, it would save the effort of having to select B39:V39 manually and clicking CTRL-C. I am gathering data and the copying and pasting is killing me.
Question 2) Is it possible that when I click on Cell A9 that it can paste any data that I just copied from another worksheet to cells A9:D29? The size of the selection that I would copy is the same size as A9:D29 (4 columns & 29 rows).
I have searched for a solution, but I am not having much luck since I am anaware of the proper terminology for these types of actions.
I need an excel macro that will copy the last row of data from one worksheet within a workbook to another worksheet in the same work book. The last row number of data will alwasy vary
I am looking for a Macro, which would first ask me to input the member notation in a new tab (Say M1 in the example). After I give the input as M1 or M2 or M2 or so on, it would display only rows for Section 1 (min and max values) and section 4 (min and Max values)(highlighted in Red). I know it is petty simple, but I am still an amateur with regards to Macros.
i created a sheet and called it "Original" (which somehow is a template), in another sheet i created a big Button named "Create account" ,then i created a macro which copies that "Original" sheet and by default it names it "Original 2 " now that i need a new account each time i click that button to create a new sheet and rename it by the client name i need, in order to keep the "Original" intact as a template. It happens sometimes by mistake that i rename the "Original" one ( The template one) which therefore returns an error when i click the button!
Is there anyway to add to that macro a code which rename that "Original 2" something else lets say "Account" to differentiate it from the Template one?
Or to Protect only the "Original" sheet from being renamed out of the whole sheets i have , in order not to rename it accidentally?
Trying to create a spreadsheet to track transactions. Sheet "A" is the working file with a limit of 25 rows. When a transaction is complete, I would like a macro button that copies one of these rows (1-25) to an archive file (Sheet "B"). I would like it to copy and paste to the next available row on Sheet "B".