Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default AUTO-CHANGING THE DATE

I HAVE MONTHLY FINANCE REPORT WHICH HAS DATA THAT CALLING UP FROM WORKBOOKS CREATED DAILY THAT HAVE NAMES AS THE DATE CHANGES(ie FR291203(TODAY'S DATE)). EACH DAY I SHOULD COPY YESTERDAY'S FORMULA & PASTE IT ON 2 ROW BELOW OF THE YESTERDAY'S TABLE AND REPLACE(EDIT-REPLACE) A PART OF FORMULA TO TODAY'S DATE (ie =FR291203 TO =FR301203). IS THERE ANY EASY WAY TO AUTOMATE IT WITH A MACRO?
NEED HELP ;-)
THNX
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default AUTO-CHANGING THE DATE

please don't SHOUT!

Yes, this is what code is for.

You need to set a variable to hold the workbook name

dim sWB as string
sWB = "c:\temp\FR" & fromat(date,"ddmmyy") & ".xls"
''' note the full path !!
'' next set a variable to point to the active worksheet
'' and to the book you want to open

dim ThisWS as worksheet
DIM FRWB as workbook


set ThisWS = ThisWorkbook.Worksheets("results")

set FRWB = Workbooks.Open(sWB)

''' code here to copy the data


''close the FRdate workbook without saving !
FRWB.Close False
SET FRWB = NOTHING



this is basically th ewrapper top set the FR workbook
name, open it, then close it.
Decide how you want the data to be copied.
You might do it like this.
Open the FRBook. Start the macro recorder, copy the data
stop the recorder and close the FR book. Examine the
recorded code

Let us know the next steps once you've tried this
Patrick Molloy
Microsoft Excel MVP







-----Original Message-----
I HAVE MONTHLY FINANCE REPORT WHICH HAS DATA THAT

CALLING UP FROM WORKBOOKS CREATED DAILY THAT HAVE NAMES
AS THE DATE CHANGES(ie FR291203(TODAY'S DATE)). EACH DAY
I SHOULD COPY YESTERDAY'S FORMULA & PASTE IT ON 2 ROW
BELOW OF THE YESTERDAY'S TABLE AND REPLACE(EDIT-REPLACE)
A PART OF FORMULA TO TODAY'S DATE (ie =FR291203 TO
=FR301203). IS THERE ANY EASY WAY TO AUTOMATE IT WITH A
MACRO?
NEED HELP ;-)
THNX
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default AUTO-CHANGING THE DATE

Patrick Molloy wrote

sWB = "c:\temp\FR" & fromat(date,"ddmmyy") & ".xls"


assume you meant format instead of fromat, lest a lurker or OP copy & paste
and wonder why it doesn't work.

--
David
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
auto date changing on worksheets never Excel Discussion (Misc queries) 8 July 29th 08 09:16 PM
Auto Date 4 changing fields in a line nastech Excel Discussion (Misc queries) 3 October 12th 05 11:49 PM
Auto Protecting cells & auto filling date ccarmock Excel Discussion (Misc queries) 7 September 30th 05 09:21 PM
assign auto number and auto date Krit Kasem Excel Discussion (Misc queries) 2 January 14th 05 02:55 AM
Auto date changing in Excel is maddening brhicks Charts and Charting in Excel 3 December 16th 04 02:54 PM


All times are GMT +1. The time now is 06:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"