How to code it in macro? 05-18-10

There is a list of files under column A, I would like to create a macro to 
open - updating all links - save  - close each file one by one for each file 
from A2 to A20.  There is one condition to process each file, for example;

The following files will not be processed until the last updated for this 
file C:\documents\A.xls is today, then open - updating all links - save  - 
close following files,

C:\documents\A1.xls in cell A2
C:\documents\A2.xls in cell A3
C:\documents\A3.xls in cell A4

The following files will not be processed until the last updated for this 
file C:\documents\B.xls is today, then open - updating all links - save  - 
close following files,

C:\documents\B1.xls in cell A5
C:\documents\B2.xls in cell A6
C:\documents\B3.xls in cell A7

The following files will not be processed until the last updated for this 
file C:\documents\C.xls is today, then open - updating all links - save  - 
close following files,

C:\documents\C1.xls in cell A8
C:\documents\C2.xls in cell A9
C:\documents\C3.xls in cell A10
....

Does anyone have any suggestions on how to code it in macro?
Thanks in advance for any suggestions
Eric
0
Utf
5/18/2010 3:55:01 PM
excel.programming 6508 articles. 2 followers. Follow

0 Replies
873 Views

Similar Articles

[PageSpeed] 14

Reply:

Similar Artilces:

creating a macro
I am creating a sheet that has 3 basic columns. (see below). What I want is to create a macro that will automatically give me the lowest bid of the three. I would also like to create a column that shows the differnces in the three. For example Estimate #1 is $500 more than estimate #2; Estimate #3 is $700 lower than Estimate #1 and $200 lower than Estimate #2 Can this be done? A B C D ESTIMATE #1 ESTIMATE #2 ESTIMATE #3 BID $2,000.00 $1,500.00 $1,300.00 Any formula for th...

Formula for current month minus one = Quarter number in a macro.
I have a macro that does several things. The last step should be to save the file to a network drive with a name and quarter number appended to it. The file save command I have got is: - ActiveWorkbook.SaveAs Filename:= _ "Y:\Skip Register\Quarterly Charging Period ?", FileFormat:=xlExcel9795, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False The ? in the file name should be substituted by the formula as described below. The macro is to be run in the month following a quarter (i.e. run macro in April to get Quar...

Need VB5 code for these VB6 instructions
I am trying to use the vbSendMail.dll (written in VB6) in a VB5 project. Need Vb5 code for: Private WithEvents poSendmail as vbSendMail.clsSendmail Private Sub Form_Load() Sdet poSendMail = New clsSendMail End Sub Help!! On Tue, 26 Jan 2010 13:33:01 -0800, Dennis Rose <DennisRose@discussions.microsoft.com> wrote: >I am trying to use the vbSendMail.dll (written in VB6) in a VB5 project. >Need Vb5 code for: > >Private WithEvents poSendmail as vbSendMail.clsSendmail > >Private Sub Form_Load() > Sdet poSendMail = New clsSendMail >...

CRM installation 05-03-05
Hi, I have the following problem: As a prerequisite for CRM installation you have to install and start the indexing service. Whenever I start indexing service on my Windows SBS 2003 server the CPU usage goes up to 100% and I lose control of my system. At this point all I can do is turning the system down and restart it. I've also tried to set indexing parameters to low values, but this operation has not changed anything. Thank you Marco Hi Marco The first time Indexing service is run it will take quite some time to build it's inital index, and once this is done it will use lo...

Audit Trail Code
I have the following code to help with an audit trail in Access 2007 but it keeps bringing me back to the code below when I try to save my form. It highlights Call LogError but the first and second lines are in all yellow. I am a novice and have no clue of what all that means. I copied the code of course. Function AuditEditBegin(sTable As String, sAudTmpTable As String, sKeyField As String, _ lngKeyValue As Long, bWasNewRecord As Boolean) As Boolean On Error GoTo Err_AuditEditBegin 'Purpose: Write a copy of the old values to temp table. ' It is th...

macros and hlookup
I have a macro that enters a new row and then carries out a series of instructions based upon this inserted row, for example entering 'filled down' calculations in the new row and other similar processes. I would also like the macro to amend a HLOOKUP function (as when the row is inserted the array size increases by one, as does the required row). For example, before the macro is run the function looks like this: =HLOOKUP('Project Summary'!B1,'Associates Hours (actuals)'! S5:AD76,72,TRUE)*30 but then after i need the function to look like this: =HLOOKUP('Pr...

Applying same macro to all worksheets in workbook
HI, I am trying to find an easy way to apply a macro that changes the absolute value of a couple of cells and changes some plot formatting to all sheets in a workbook. All sheets are the same and need the same macro applied to them, I have recorded the macro such that I can click on a worksheet and hit a keyboard command to execute this, but I have to individually select each worksheet and repeat this throughout, how can this be automated? Thanks, Josh Rewrite the macro so it takes a worksheet as an argument. Then write a second macro that iterates your worksheets and passes them one at...

Digital Signature? 03-19-10
I'd like to put a digital signature on my XL2007 project, so internal users can open from a LiveLink location (it's unsafe for them to make the location a trusted one), without having to manually enable the macro/activex content. But for the life of me, I can't figure out where I GET the signature. When I open the VBA dialog box to add one, there are none to select from. Hints please? B Lynn B - You get the digital signature by purchasing it. See "Get or create your own digital signature" at http://office.microsoft.com/en-us/help/HA100997641033.as...

Anti-crack and anti-piracy application protection and licensing solution using code morphing
Software piracy! Cracked serial numbers! Thousands of commercial products are posted on the warez sites and become available to all every day! Companies lose millions of dollars every year to software piracy, and faulty protection programs. Shareware developers look for unbreakable protection for their products and create some protection themselves or try many of the ready-made tools. Unfortunately most tools have already been cracked, and self solutions often only take one determined cracked a few hours to bypass. As a result they soon find the stoles keys and product cracks on thousands of ...

Problem with code
Dear all please see below a previous post made and a resolution posted however this code is returning an error. Can anyone see where this error is. Also do I paste this code into a module or not Thank Ada --------------------------------- Hi, Adam Not impossible at all. Why not date-stamp each use entry in a column for each data entry row, so you ca create a little macro to clear all old dates something like Private Sub Worksheet_Change(ByVal Target As Range If Target.Cells.Count > 1 Then Exit Su If Intersect(Target, Me.Range("C1:C5")) Is Nothing Then Exit Su Application.En...

macro disabled permanently
Greetings, I interrupted a macro I wrote that went into infinite loop by hitting ESC. I fixed the macro function which is tied to "Worksheet_Change". Now it never gets triggered. I put break points in code; not executed at all. I close/open excel and respond to security dialog as "enable macros", still not working. I don't know what happened but code never gets executed. I don't know what happened. Help appreciated, Cagdas Ozgenc Sounds like events have been disabled. Type Application.EnableEvents = True in the VBIDE immediate window. -- HTH Bob Phillip...

Office Home & Student 2007 02-23-10
I am trying to install this program on my 3rd computer. I am getting the error code 1304: Error writing to file: Microsoft.Office.Interop.OneNote.dll Verify you have access to that directory. and another error code: 1712 This one had something to do with not being able to go back to previous installed versions. I now need the product key for 2003 to work. My question is: How do I verify I have access (I am the administrator) and where would I find the product key ( I don't have that disc anymore) Thank-you ...

Help 05-06-10
I'm trying to send a message and I cant And what exactly happens when you try? Any error messages? Has this account ever worked in Windows Mail? -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "Jarrod Soto" <jarroddsoto@yahoo.com> wrote in message news:uLk3suL7KHA.1424@TK2MSFTNGP04.phx.gbl... > I'm trying to send a message and I cant > "Jarrod Soto" <jarroddsoto@yahoo.com> wrote in message news:uLk3suL7KHA.1424@TK2MSFTNGP04.phx.gbl... > I'm trying to send a message and I cant ********...

Macro runs fine from VBEditor, but not button
Hi, this macro was running fine, until the conversion to Office 2007. In the Locations worksheet I have a list of locations in Zone 1. A worksheet is created for each store in Zone 1. I manually move the created worksheets into another Book. Then I go back to the original file to run Zone 2. Only now I'm getting an error: Cannot run the macro 'Book 2.xlsx'!PrepareReport'. The macro may not be available in this workbook. Why is it looking to the new book for the macro? The macro is in the original file. It does let me click on the Developer tab, Macros...

Macro to Refresh External data
Good afternoon, I try to record a macro to refresh external data but the macro recorder does not give me anything once I refresh the query and stop the recording. Does anyone knows why? Or better if you know the VBA to make this happen -even when the data sheet is hidden- let me know. Thanks in advance and greetings from south Fla. Apprentice, This is the code the recorder generated when I tried a refresh on a text file import. Range("A1").Select Selection.QueryTable.Refresh BackgroundQuery:=False You'd probably change it to something like: Range("A1&quo...

Enable/Disable Macro Pop-Up
In the older version of Office when you opened an excel or other office document that had a macro in it - you would get a pop up and the opportunity to enable or disable it. Is there a way to get that same pop-up in 2007? See Help, macro setting Change macro security settings in Excel juamig wrote: > In the older version of Office when you opened an excel or other office > document that had a macro in it - you would get a pop up and the opportunity > to enable or disable it. Is there a way to get that same pop-up in 2007? > Right, someone else told me the...

windows update 03-11-10
do i need to keep all those updates on my PC ie... the updates that have been installed over a year ago? "timbo" <timbo@discussions.microsoft.com> wrote in message news:9BA5D186-44CD-4E17-B6E0-13385C151E1C@microsoft.com... > do i need to keep all those updates on my PC ie... the updates that have > been installed over a year ago? Why does this cause you concern ? -- "Don't pick a fight with an old man. If he is too old to fight, he'll just kill you." timbo wrote: > do i need to keep all those updates on my PC ie... the up...

VB Code for button for Access 2003
I have a form called "Quote Entry" displaying data from a table called "Quote" with a field "CustomerID", on this form there is a button called "Customers". This opens a form called "Customer Display" which is a Continuous list of customers, from the current selected customer record. I need some code for a button on the "Customer Display" form to save the current CustomerID back the Quote Entry form and add it to the Quote Table -- thank you for your help "Meaty" <Meaty@discussions.microsoft.com> wrote in messa...

Crosstab
Hi, I have a query that looks like this: TRANSFORM Count(mytable.var2) AS cnt SELECT mytable.var1, count(mytable.var2) AS TOTAL FROM mytable GROUP BY mytable.var1 PIVOT mytable.var2; and my result looks like this: var1 female male 1 30 10 2 40 20 3 50 30 Is there a way I can name the columns to "column1", "column2" and so forth, instead of female and male? Assume there are any number of columns. Thanks in advance, Jenni You can alias your column headings but it may take a few steps/queries. The first step might be to cr...

Macro to close excel #2
I have been using the ActiveWorkbook.save ActiveWorkbook.Close (False) commands to first ensure the spreadsheet saves and then closes. Th problem I am having is that this leaves Excel open. With spreadsheets running daily each using this .Close command, I end u with an awful lot of open excel windows. I use Scheduler in conjunction with the Auto_Open macro to activate th spreadsheets to run automatically. I have tried to use the 'Stop th task if it runs for - 59 minutes' setting but this doesn't get rid o Excel off the screen either but appears to just generate a Dr Wats...

Assign a macro to Command Button Object
When I right click on my command Button to locate the option of assign to macro its not their. How do I get the option to assign to macro to appear? The other options are available to me on the command button but not the assign to macro??? -- thanks, mc Hi Dallin, If the button is from the Control Toolbox, double-click the button which will take you to the sheet module and provide you with a macro stub for the CommandButton something like: Private Sub CommandButton1_Click() End Sub Insert insert the body of your macro between the two stub lines. Alternatively, if the macro you ...

Excel 2007 Macro Recorder not recording shapes
Hello, I am trying to figure out why my Excel macro recorder is not recording creation of any shapes or changes to existing shapes. I started the macro, and drew a rectangle and stopped it. This is all the code I get. I like to see the syntax for shapes and I am unable to see maybe there is some problem with macro recorder. Please help! Thanks! Sub Macro1() ' ' Macro3 Macro ' ' ActiveWindow.SmallScroll Down:=25 End Sub Regards, Jaan On Feb 14, 2:35=A0pm, jaanbazz <jaanb...@domain-xyz.in> wrote: > Hello, > I am trying to figure out why...

Exchange 2007 in AD site with RODC 05-17-10
Hello, My question is if it possible to deploy Exchange server 2007 in an AD site that have RODC only? I know that Exchange cannot work with RODC. I understand that is not much sense in such configuration. But, in principal, can Exchange be in an AD site with RODC only and use a writable DC from other sites for work? On Mon, 17 May 2010 05:08:01 -0700, Vitalii Ponomarov <VitaliiPonomarov@discussions.microsoft.com> wrote: >Hello, > >My question is if it possible to deploy Exchange server 2007 in an AD site >that have RODC only? I know that Exchange canno...

TRACE macro not working.
Hi - I am very new to Visual C++ and MFC, so please bear with me. I am using VStudio.NET 2002, and am learning how to write Windows programs with C++, having had a lot of VB experience. I am having problems getting my CView derivation to show graphics functions, and I have been putting TRACE statements in the code to see what's going on. I know they must be executed because MessageBox() appears on cue. I am using the Debug configuration, and as far as I know I haven't changed any defaults. However, nothing is appearing in the Output Window. Any ideas? Thanks, -- Mark Bertensha...

Who can explain this code for me?about virtual function
/////////////////////////////////////////////// // CIOMessageMap.h class __declspec(novtable) CIOMessageMap { public: virtual bool ProcessIOMessage(IOType clientIO, ClientContext* pContext, DWORD dwSize) = 0; }; #define BEGIN_IO_MSG_MAP() \ public: \ bool ProcessIOMessage(IOType clientIO, ClientContext* pContext, DWORD dwSize = 0) \ { \ bool bRet = false; #define IO_MESSAGE_HANDLER(msg, func) \ if (msg == clientIO) \ bRet = func(pContext, dwSize); #define END_IO_MSG_MAP() \ return bRet; \ } Why class CIOMessageMap should be declared by declspec(novtable)? The macros implements the member ...