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
i have attached the code in notepad ...
View 8 Replies
ADVERTISEMENT
Mar 17, 2009
Is there a way to run a macro automaticly on a closed work book every Friday ? I've found ways of doing this using on-open event but It made me wonder if this was possible.
View 9 Replies
View Related
Nov 22, 2009
I am currently using a macro to copy a sheet from a closed workbook in to my current workbook. However this copying is based on the sheet name. At present when I run the following code
View 11 Replies
View Related
Aug 21, 2009
how to get excel to open a work book in my c drive if i have given it the location in cell m2
eg: the cell is M2
C:AVERAGE PRICE (update 2009) 240809
i need the macro to open this workbook when i click the button in the workbook i have open that has the above in cell M2
View 3 Replies
View Related
Mar 19, 2005
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
View 9 Replies
View Related
Jun 18, 2009
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
View 10 Replies
View Related
Feb 1, 2007
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?
View 9 Replies
View Related
Oct 1, 2008
I am trying to copy a range from one workbook to another book sheet with the below code. But its giving error.Can any body fix the below code.
Dim rng1, rng2 As Range
Set rng1 = ThisWorkbook.Sheets(1).Range("A1")
'Create a new work book
Dim xlapp As Object 'Excel.Application
Set xlapp = CreateObject("Excel.Application")
xlapp.Visible = True
' Add a new workbook
Dim xlbook As Object 'Excel.Workbook
Set xlbook = xlapp.Workbooks.Add......................
View 9 Replies
View Related
Apr 5, 2007
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:= _...................
View 5 Replies
View Related
Aug 3, 2009
I know how to create a text link to other cells within a work book but how can I create a button which will do the same?
View 2 Replies
View Related
Aug 17, 2009
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.
View 4 Replies
View Related
Jan 11, 2009
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.
View 4 Replies
View Related
Mar 3, 2009
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.
View 9 Replies
View Related
Feb 13, 2010
In column J, Cad Hrs. How to make to display (0), instead of (-0,02) when I just do other work than Cad Work? I need to separate type of work according to price hour, overtime, and so on.
View 2 Replies
View Related
Dec 29, 2009
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 .
View 9 Replies
View Related
Feb 4, 2009
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
Sub CopyPriorMonthAccruals()
ActiveCell.FormulaR1C1 = "=EOMONTH(Input!R[5]C,-1)"
Columns("L:L").Select
Selection.Copy
Columns("Y:Y").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("B3").Select
ActiveCell.FormulaR1C1 = "=EOMONTH(Input!R[5]C,0)"................................
View 9 Replies
View Related
Jul 1, 2014
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??
View 2 Replies
View Related
May 28, 2009
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
View 2 Replies
View Related
Apr 17, 2007
I need to remove hyperlinks across probably 30-40 workbooks, is there a way of doing creating a macro that would do this across many instead of 1 at a time?
View 9 Replies
View Related
Sep 5, 2008
Everytime a cell (say B18) changes value I want the following to happen:
If it changes to "Annual" I want row 20 to ungroup
If it changes to "Quarterly" I want rows 22-25 to ungroup
If it changes to "Monthly" I want rows 27-38 to ungroup
From what I can see on other discussion groups I need to enter a code on the worksheet from view code... but I cant work out the code that I would need to enter.
View 9 Replies
View Related
Oct 22, 2008
I have a file with date from the whole year.
Now i want that he splits for me in the file the weeks. So that i have all the info for each week. (seperating by 2 or 3 blank rows)
A second thought was to copy paste them to a new sheet for each seperated week.
and if i just splits them by inserting blanks rows between the weeks. I was wondering if it is possible to make a pivot for each week
i thought maybe working with boxname?
View 9 Replies
View Related
Apr 7, 2009
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.
View 9 Replies
View Related
Sep 19, 2006
I've been using a Macro that was written in an Excel spreadsheet and it's been working fine. For some reason, the Macro does not work anymore.
The Macro is written in Visual Basic and it is launched with button.
What is the first step I should take to debug this?
I think it's something obvious I'm missing.
View 9 Replies
View Related
Jun 22, 2007
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
View 3 Replies
View Related
Feb 15, 2013
I've written a macro in an attempt to automate the advanced filtering in Excel.
VB:
Sub FilterData()
Sheets("Filter").Select
Range("B10").Select[code]....
View 5 Replies
View Related
Nov 28, 2008
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?
View 3 Replies
View Related
Jul 6, 2005
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...................................................
View 14 Replies
View Related
Mar 14, 2008
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?
View 13 Replies
View Related
Jan 8, 2012
I dont like the way the toggle button looks. So i wanted to create a button that when pressed would recognized if row 19 was hidden or not hidden..
Then if it was already hidden it would unhide the row 19
or if it was not hidden it would hide the row 19 when clicked
Is this possible via a macro?
View 1 Replies
View Related
May 23, 2012
Can we get a macro in excel where we can browse web page and get the data from a internet based webpage.
View 3 Replies
View Related