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


Run A Macro Automaticly On A Closed Work Book Every Friday

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

Macro To Copy Sheet From Closed Work Book And Overwrite If Sheet Already Exists

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

Get Open A Work Book

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

Work Book About 20 Sheets In It

Mar 19, 2005

got work book that has about 20 sheets in it.....there are links throught the workbook. 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 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 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 all the files to a memory chip.......go to a different pc with my version of windows (XP) each file it.......go back to my pc...reload it

View 9 Replies View Related

Work Book Into Software Application How

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

Transferring Sheets To New Work Book

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

How To Copy A Range To Another Work Book

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

Save Work Book In 2 Separate Directories

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.

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")
Application.DisplayAlerts = False
ChDir "c:Documents and SettingsmeDesktop"
ActiveWorkbook.SaveAs Filename:= _...................

View 5 Replies View Related

Create A Text Link To Other Cells Within A Work Book

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

Can Data Validation Lists Reference Another Work Book?

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

Work Out A Formula For My Spreadsheet Which I Use To Work Out Cutting Lists For Timber Frames

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

Work Accurately With Times To Calculate The Work Progress Of The People In The Workshop

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 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

Make To Display (0), Instead Of (-0,02) When I Just Do Other Work Than Cad Work

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

Copying A Certain Range In A Work Sheet To Another Existing Work Sheet Using VBA

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

Macro Not Work On Another Tab

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)"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=EOMONTH(Input!R[5]C,0)"................................

View 9 Replies View Related

Make Macro To Work On PDF?

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

Do While Macro Seems To Work In Stages

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

Macro To Work Across Many Workbooks?

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

Macro To Work When Cell Changes Value

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

Macro: How Work With Weeks

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

Transpose Won't Work, Perhaps A Macro Will

Apr 7, 2009

I am sent an email that contains multiple blocks of information.

They're broken down like this:


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

Macro Does Not Work Anymore

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

Vlookup Does Not Work In A Macro

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
myValue = Cells(i, 1).Value
n = WorksheetFunction.VLookup(myValue, "A1:A11", 1, True)
Cells(i, 2).Value = n
Next i
End Sub

View 3 Replies View Related

Advanced Filter Macro Does Not Work?

Feb 15, 2013

I've written a macro in an attempt to automate the advanced filtering in Excel.

Sub FilterData()

View 5 Replies View Related

Work On Other Files While Running A Macro?

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

Progress Bar To Work While Running The Macro

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
With PB

.title = "some title"
.caption1 = "Executing, this may take a while"
.caption2 = "Doing task 1"

View 14 Replies View Related

Macro Combining Work Sheets Into One

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

Macro Work Like Toggle Button?

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

Macro To Work On Internet Explorer?

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

Copyrights 2005-15, All rights reserved