How To Get A Macro To Work With Any Work Book Name
Aug 24, 2009
i have a made a macro that copies info to a new sheet now that is working great but if i change the name of the work book it wont work any more so i need the macro to work with what ever name i give the workbook
the current name is
AVERAGE PRICE (update 2009) Mimmos Armico 170809.xls
got work book that has about 20 sheets in it.....there are links throught the workbook. ......one sheet in particular when i go to it, it freezes up...and i get the dreaded "Send Error Report to Microsoft" window"...and we all know what happens next.....excel shuts right down.
I can open the workbook and click on ANY sheet....but when i click on this one particular sheet in the book i get the error message
This work book is a template....its the estimating work book i use at work...and whenever i get a new job to estimate i open up this template.....put in my data and save the workbook as the job title.....so basically i have about 50 of these workbooks......and it doenst matter which one i open.......whenever i go to this one same sheet in any workbook i get the freeze
and the freaky thing about this is it does it randomly....I make save this template (as a new work book) when i get a new job to estimate.....and i never have any problems.......but today for some crazy reason its doing what i mentioned above......it did this about a month ago too.......same exact problem.
when it happened the first time i tried all kinds of stuff, and the only thing that worked was i had to go to windows explore...save all the files to a memory chip.......go to a different pc with my version of windows (XP)....open each file up......re-save it.......go back to my pc...reload it
i have put together quiet a large work book that i can easly update with new info and it is working great thanks to alot of help i got from you all
Now i would like to have all this info go into a simpal user inter face so that my staff can use it i am thinking of somthing of making it like a sml application i would like to know if there is a program that i can download that would do this for me or if there is a simpal way to go about getting it done useing excell its self i know quite a bit about excel but how to take it that far not sure and i do learn fast once i know i will be fine so pls even if it means you useing a complicated awnser the do it as i will keep trying untill i get it working
i want to do a macro, that will copy and transfer Selected worksheets to a new Workbook? so guessing, you select the sheets, then click the button and it copies then opens new blank workbook and puts them in?
I have a fluid document that I have to save for historical reasons in 2 separate directories. My save Macro works I was just wondering if anyone see's a better way of accomplishing saving to two separate directories then closing the document. I used the record function to gernerate most of the code.
Sub SAVEANDEXITTHESLATE() Dim date1 Dim date2 Dim xlCalc As XlCalculation xlCalc = Application.Calculation Application.Calculation = xlCalculationManual On Error Goto CalcBack Application.ScreenUpdating = False date1 = Now() date2 = Format(date1, "mmm d yyyy hh mm") ActiveWorkbook.SAVE Application.DisplayAlerts = False ChDir "c:Documents and SettingsmeDesktop" ActiveWorkbook.SaveAs Filename:= _...................
I have a cell that I want to use data validation on so I have a drop down list. Problem is the location of this list will be in another workbook.. Is this possible to go from one workbook to another using data validation?
Also, depending on the information that is selected from the drop down list I want a cell to the left to pick the corresponding data from the list in the other workbook. These forms will always be in the same folder.. Not sure if that information is necessary but just in case you need to know.
i need to work out a formula for my spreadsheet which I use to work out cutting lists for timber frames. I need it to work out if the width of a job is for eg 2400mm i need to work out how many timber studs I need so the space between each stud is between 400mm and 500mm and this will need to work for a range of different sizes of frames. I have it written at the moment and it just devides the width by 400 and gives me a amount of studs but it would work much better if it could space them between 400 & 500.
In a project i am compiling i need to work accurately with times to calculate the work progress of the people in the workshop thus....here goes....
I have in work book #1 (7) sheets mon to fri + complete week + a sheet where all job numbers are collected.
From monday to friday the workmen log their times as a start time and a end time. This has to be then calculated to a total hours:mins spent per job, wich in turn then has to be calculated to a total hours:mins spent per day. And the on the complete week sheet recalculated as a total time worked per week.
I have a range of cells in a work sheet "sheet 1 " my objective is to filter this range according to certain criteria (i ve succeeded to do this ) yet what i want to do now is copy this data to another existing worksheet in a certain range .
note :the existing worksheet to which i 'll copy the filtered data has some cells out of the range that i dont want to over write ..
Simply :how to copy a selected range of cells in a work sheet to already existing work sheet in a specific range aswell .
To run a macro from the first tab of the workbook but have it do it work on another tab.
In the workbook in question I have a tab called "input" were certain information in updated and is linked or used in formulas on other tabs. Some of the tabs have macros that do various functions. I would like to set up one macro button on the "input" tab that would run the macros on the other tabs instead of having to run each one individually from its own tab.
Below is on of the macros that I would like to run from the "input" tab and have it update the "AP Accrual" tab
I've got a PDF file that I was hoping to convert into an Excel sheet, but it doesn't look like that's possible, xince I'm working with only Adobe Reader, not Acrobat. Anyway, I need to compare 1 column of this report to another report that IS in Excel. Is there a way to have a macro compare an Excel file with a PDF??
I have a macro which loops through data, deleting those rows that are marked with a "Y". However - it appears to always want to do this in three stages. The first time I run the macro, it delete's a large chunk of those marked rows - but it nearly always leaves two rows. The second time I run it, it deletes one of those two remaining rows. And then I run it again and it deletes the final outstanding row. I'm sure i've done something stupid here - the code is below
I am sent an email that contains multiple blocks of information.
They're broken down like this:
Title Link ID Department Date Status Value News
There are about 100 of these blocks of text in the email, and some of them are duplicates. What I'd like to do is copy them into Excel, and run a macro which separates them into the appropriate column and removes the duplicates. The problem that I'm running into is some of the blocks have a value (highlighted in red above) and others don't have anything at all. I'm looking for a solution that will be able to evaluate the text and if the cell after Status isn't value, I'd like it to insert a blank cell, a cell that says ignore, or something that will keep the format correct.
why the macro "try()" in the attached workbook does not work?
I get the error message: "Unable to get the Vlookup property of the WorksheetFunction class"
Sub try() Dim i% For i = 1 To 35 Sheets("Sheet2").Select myValue = Cells(i, 1).Value Sheets("Sheet1").Select n = WorksheetFunction.VLookup(myValue, "A1:A11", 1, True) Sheets("Sheet2").Select Cells(i, 2).Value = n Next i End Sub
I have designed a macro which consists of a form through it takes the input into excel sheet. The macro is running fine and I dont have any problems with it. The problem I am facing is that after I start running this macro, I am not able to access any other open excel files. Is there any option to make all other excel files available during running a macro?
I was looking at a previous post to get a progress bar to work while running a lengthy macro. Below is the post on how to incorporate the progress bar into your code.
That works fine expect for one thing. There is a cancel button on the progress bar, and when it is pushed the rest of my code continues running. How do I end my code if I press cancel on the progress bar?
Sub Main Dim PB as clsProgBar Set PB = new clsProgBar
'if your subs are being called from a userform, hide the form first using Me.Hide With PB
.title = "some title" .caption1 = "Executing, this may take a while" .caption2 = "Doing task 1" .show doevents...................................................
I have the below macro in a workbook that I need to combine the two sheets into one, (sheet1 and sheet2). Both sheets in use column "A" for id, but for some reason it is only copying over sheet one? One sheet has 12 columns and the other has 13, not sure if that is making the difference?