Macros Not Visible: End User To Be Able To Run The Report Multiple Times By Choosing The Name Of The Macro From The Macro Menu
Jul 16, 2007
I have written two VBA programs around the same time. Both run on open and pull external data and create graphs. My problem is that I want the end user to be able to run the report multiple times by choosing the name of the macro from the Excel macro menu (i.e. Tools>Macro>Macros) but only one of the workbook macros shows up on the menu. why the other macro is not visible on this menu???
I have a big list of names of people that have completed a bunch of training they have completed. I want to be able to run a pivot table/chart and only count a user once vice each time they have completed a training. So in otherwords I want to get a count of how many people are on the list vice how many certifications they have.
I have a button that a user clicks to print the info they entered. I need some code to add a running count to a cell (say, H2) every time the user clicks that button and runs the print macro.
I'm looking for a way for excel to output data to a cell dependent on what I choose from a drop down menu.
For example. I have a drop down menu with 3 options. 1,2 and 3. What I want is that if I choose option 2, then in cell A2 (or whatever) would output the value of 2, say "2222". Or if I choose 1, then A2 would output the value of 1, say "12345".
I have a problem with multiple charts in one sheet. The problem is really weird because when i add the charts to the sheet where all the values are then there is no problem, but when i set the position of the charts to another sheet and specific position it gives me an error
Here is my sub for making the chart:
Sub chartFormat(FChart As Chart, Hø As Integer, Bre As Integer) With FChart .ChartType = xlLine With .Parent .Height = Hø .Width = Bre End With With .SeriesCollection(1) ' THIS IS WHERE THE ERROR OCCURS .Border.ColorIndex = 10 .Border.Weight = xlThick End With With .Axes(xlCategory) With .TickLabels .Alignment = xlCenter .ReadingOrder = xlContext .Orientation = xlUpward End With End With
are the sheets where I wanna place the chart and where I get the data.
Now if I change profVis to sag all places then it works fine and it places all the charts and make them perfect. But when profVis is there, it makes and error 1004 :
Method 'SeriesCollection' of object '_Chart' failed.
But the error first occurs after the first 2 chart have been made. I've tried switching them, so the last chart becomes the second, and it can make it. It seems as if there is a limit of 2 chart?
Is it possible to create 1 macro which will execute multiple macros on different sheets?
I have approx. 12 macros that I can run in order, and I would like to create 1 button on the first sheet of the workbook to execute all 12 macros, which are contained on various other sheets. Is this possible?
When I attempted to do this, the master macro ran an odd function on my first sheet.
I have 3 seperate macros (macro1, macro2, macro3) that have to be run in order. Is it possible to create a macro to run them in order and what would the code look like? I will have it assigned to a button on the worksheet.
I've taken data from a fixed-length text file and the records are identified using the first two characters on each line of the text file. I've managed to identify these in each row with other bits of code so that was fine.
Now, I have 56 string variables (identifying my record types), which I'm assigning into an array. Then, I want to go through each variable in the array, performing the same action by way of a For Next Loop where, by taking this particular RecIDNo (see my code) string variable I will get the code to copy/paste the data into the relevant worksheet (where later on I will apply a text to columns using another array). But first, this set must work before I can do that! To avoid confusion, note that the record types i.e. 01 through to 56, will be filtered, then copied into the corresponding worksheet with the same number.
The problem I'm getting is the autofilter I'm applying, then the array I'm trying to reference (to avoid repetitive coding!) doesn't work as the code doesn't compile (I've not worked a lot with Arrays but I'm learning all the time!)
Option Base 1 Sub test() 'The array is declared here: Dim RecIDNo(56) As String 'The arrays are assigned the string variables below: RecIDNo(1) = "01" .... RecIDNo(56) = "56" 'This worksheet contains my data: Sheets("DATA").Select
For RecIDNo(1 To 56) '<--I THINK THIS IS WHERE I'M GOING WRONG!! 'Filter and select arrays:................
Im looking to create a macro that goes to a specific sheet on my workbook upon selecting an option. Example being I open the spreadsheet and a list of options come up such as:
BRIAN JOHN JAMES PAUL STEVEN
Upon selecting one of those names you are transferred to the sheet named "BRIAN", "JOHN", "JAMES" etc etc etc
I'm adding a menu selection to the right-click menu that you get for cells. I can add and remove the menu option but, when I try to execute the macro tied to the menu, I get "the macro...cannot be found". I can't figure out what appears to be a "pathing problem". I'm sure it's simple but...
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.
What i want to do is copy all records from whatever date i enter, onto sheet test. The full excel file has over 80 worksheets for each individual rep, the example i attached has 8 sheets..
I've recorded a macro that copies an entire tab into a new spreadsheet then goes on the copy and paste information from one tab to another.
When I run the macro from the Tools>Macros menu it works perfectly. But when I copy the code and add it to that of a button it fails and posts the following error: Run-time error '1001': Select method of Range class failed.
The first attachement shows the code for the macro as it is alone, and the second shows how I simply copied and pasted it into the 'view code' window of the button.
Needless to say I'm a beginner at macros and only every record them, I can usually make stuff work that way but this has me stumped!
with the following....In the first sheet of attached file I keep data regarding all invoice sheets next to the data sheet (not visible in this example). I like to print an invoice in all sheets (area H3-AI43) from a selected invoice sheet out of a drop-downlist in the "data"sheet. After printing the actual printdate must be placed in column F of the "data" sheet next to the sheet number. Would be great if this is possible! Maybe I'm not clear enough. The purpose is to print only 1 invoice from a selected sheet out of the drop-down list.....and not all invoices from all sheets!
I need a macro which collects data from two files and dumps it into a separate spreadsheet. I need it to prompt the user to select the two files, since the file names may change.
Once a user selects the files, the macro simply opens them, grabs the data (the data sits on a single sheet in each file) and pastes it into a file, and closes the 2 data files.
In my workbook I have about 20 sheets (less in the attached sample), and on most sheets I’d like to query data for each day and find an average value based on the time and then copy that result into another sheet. I’m not sure if I’ll need 2 macro’s for this or if one can be used.
Here’s a quick description:
Assuming that I am currently in the sheet I want to run the macro, then I will either input “1:45” or “0:45” into a popup box, or I could always simply input the 1:45 or 0:45 in the code itself. I’m flexible
1:45:
If I input 1:45, then I’d like the macro to find the first 1:45 in Column B and the value in the same row in Column F will be used in the calculation. Once 1:45 is located, then the macro moves up to find 22:45 in Column B and the value in the same row in Column F will be used in the calculation.....
I have created a macro that copies the outcome of a specific calculation (that is driven by random numbers) and pastes it (as values) into a seperate table. It then recalculates the sheet, copies the new outcome and pastes it into the same table at a row beneath the previous one.
However, I would like to be able to determine how many times this loop is repeated (i.e. how many rows of outcomes will be generated) without having to change the macro each time. Is this possible? Maybe by just linking it to a cell where the number of outcomes/repeats is specified.
I have a macro where I manually select a cell then the macro kicks in to copy and paste the contents into the Find function. From there it goes to another work sheet, clicks on a cell in column one and searches for matching cell contents. Then If false it manually goes back to the original worksheet/cell and then I input a N in the left adjacent cell. If true I enter a Y. Right now I can only run this for the specific cell the macro was recorded for. I would like to expand this.
What I would like to do create a loop in the macro that waits for my cell choice input then continues with the with the Find function. If false the macro should just loop back to the original worksheet/cell and wait for input, ie the next cell selected. However, if true a worksheet/cell is selected, a Y is input and it loops back to the original cell and waits for input.
How can I write my code so that the drop down box always is visible ( like a combobox)? This code is correct and makes a drop-down list but I want it visible at all the time.
I have recorded the following marco and it works fine. I would like to modify it so the user would highlight a range of cells rather than have the fixed area :
I have set up a menu bar and I want to run two macros. The code I am using for some reason is only running one of the macros. I can't figure out why the other one will not execute.
I have a macro (see attached) that works fairly well, but the one thing I cannot figure out how to do it how to merge cells whenever there is a break in Project ID.
If you take a look at the spreadsheet, you will see that columns B and C for the 2nd Project ID is merged just how I want it to look. The number of rows in each Project ID is variable.
I download excel report from Business object reporting tool and the file will be very huge something like 25MB and it takes nearly 40 Min to open the report and the data will be merged in the report......can any one suggest what can be done to open the report quickly or can we open the report by using macro.... can we improve the performance of opening the 25 MB report thru macro...
I have excel sheet with filtered columns. I will do the filtering manually and after selecting a filter, I want the visible data on the sheet to be saved as PDF file.
Please note that I dont want any range to be saved as PDF but visible data because as the filter changes, so as the data will be either less or more.
I will paste data into columns A-H, I have headers in rows, 1,2 and 3. I have formulas in a few cells in row 2. After inputting my data on the sheet etc I copy all the formulas from row 2 and paste in teh relevant columns, I then select my autofilter and my selection (in this case #N/A), i then choose all visable cells (Alt and ;)and delete them. The problem is I do not want to delete rows 1,2 or 3 but all other rows (i.e. just the selected N/A rows). Can anyone help on how to do this?
Once i have figured this out I will then continue the macro to select 'all' on the filter and do the same to a few other columns.
So far I have this;
Sub Macro6() ' ' Macro6 Macro ' Macro recorded 24/03/2009 by Richard Tydeman '
I have several pre-configured macros that I would like to choose from using a drop-down menu. I know this is possible within the excel built-in ribbon, but I need to have it only in the spreadsheet. The macro will be importing a csv file. I have several different csv files that I need to be able to choose from and a drop-down list seems to be the best choice. The other option could be to have the macro prompt me to select the csv file of choice. Below is a sample of the macro that I would be using. Is this possible?
I am wondering if there is any code to SELECT (DESELECT) A MENU ITEM using VBA? I have an Excel Add-in program installed, which adds a Menu "Easycal" to my Excel menu bar. Under "Easycal" (drop down list), I have the following items:
I am using "Easycal"'s functions in various cells of my sheet "Final". When I select "Refresh worksheet" from "Final", "Easycal" fetches (or calculates) me the data from the "Easycal" database. I have a macro (on "Final") that pulls together data from other sheets of the same workbook. I there anyway to include a code in my existing macro, so that when I run the macro, the following are completed in sequence:
1. Select "Turnoff Easycal" menu item 2. Run my existing macro (to pull the data from other sheets to "Final") 3. DeSelect "Turnoff Easycal" menu item 4. Select "Refresh worksheet" menu item
I've got a basic handle on the application/use of macros, & personally use them for cleaning up data exported from a very very old as400esq application.
My problem is that i have managed to clean up all the blank data & piffle, but Im stupped by the header part of the text dump.
Heres an example; A B C D E F -------------------Header A------------- 1 3 john 50 piano 4 1 Bill 25 horn 6 5 Ted 60 trumpet -------------------Header B------------- 3 3 Phil 71 Cello 1 1 James 83 Viola 3 2 Earnie 62 Violin
I basically want to rid the header rows from the spreadsheet & drop the header description (Header A/ Header B) into column F for all those items below until you get to the next header.