#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macros

I have a spreadsheet used for managing dates and deadlines where Column K is for DUE DATE, M for EXPIRY DATE, P for RENEWAL DATE.

What I would like is to have a macro which runs automatically on launch to print a range called "reminder" if DUE DATE has passed today's date. The macro should check all cells in the Column K and then its should start from column M and print a range called "reminder1" if EXPIRY DATE has passed today's date. The macro should check all cells in the Column M and then its should start from column P and print a range called "reminder2" if RENEWAL DATE has passed today's date.


Any help would be most appreciated!

Thanks,


EggHeadCafe - Software Developer Portal of Choice
WCF Workflow Services Using External Data Exchange
http://www.eggheadcafe.com/tutorials...vices-usi.aspx
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Macros

You want to use an Auto_Open

This would go in a Module in VBA (Not on This workbook or an individual sheet)

Sub Auto_Open()
A=1
reminder= "Rows "
reminder1 = "Rows "
reminder2 = "Rows "

Do while Sheets("Sheet 1").cells (A,11)<empty
if Cells(A,11)<Date then reminder=reminder & Cstr(A)&", "
if Cells(A,13)<Date then reminder=reminder & Cstr(A)&", "
if Cells(A,15)<Date then reminder=reminder & Cstr(A)&", "
A=A+1
Loop

Sheets.Add After:=Sheets(Sheets.Count)
if reminder="Rows " then reminder="None"
if reminder1="Rows " then reminder1="None"
if reminder2="Rows " then reminder2="None"

Range("A1")= "Due Date past"
Range("b1")=reminder
Range("A1")= "EXPIRY DATE past"
Range("b1")=reminder1
Range("A1")= "RENEWAL DATE past"
Range("b1")=reminder

ActiveWindow.SelectedSheets.PrintOut Copies:=1

end sub


--
If this helps, please remember to click yes.


"Zuke Kahn" wrote:

I have a spreadsheet used for managing dates and deadlines where Column K is for DUE DATE, M for EXPIRY DATE, P for RENEWAL DATE.

What I would like is to have a macro which runs automatically on launch to print a range called "reminder" if DUE DATE has passed today's date. The macro should check all cells in the Column K and then its should start from column M and print a range called "reminder1" if EXPIRY DATE has passed today's date. The macro should check all cells in the Column M and then its should start from column P and print a range called "reminder2" if RENEWAL DATE has passed today's date.


Any help would be most appreciated!

Thanks,


EggHeadCafe - Software Developer Portal of Choice
WCF Workflow Services Using External Data Exchange
http://www.eggheadcafe.com/tutorials...vices-usi.aspx

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Macros

That last part should be:
Range("A1")= "Due Date past"
Range("b1")=reminder
Range("A2")= "EXPIRY DATE past"
Range("b2")=reminder1
Range("A3")= "RENEWAL DATE past"
Range("b3")=reminder


And remember to change the sheet name from Sheet 1 to whatever your sheet is
called
--
If this helps, please remember to click yes.


"Paul C" wrote:

You want to use an Auto_Open

This would go in a Module in VBA (Not on This workbook or an individual sheet)

Sub Auto_Open()
A=1
reminder= "Rows "
reminder1 = "Rows "
reminder2 = "Rows "

Do while Sheets("Sheet 1").cells (A,11)<empty
if Cells(A,11)<Date then reminder=reminder & Cstr(A)&", "
if Cells(A,13)<Date then reminder=reminder & Cstr(A)&", "
if Cells(A,15)<Date then reminder=reminder & Cstr(A)&", "
A=A+1
Loop

Sheets.Add After:=Sheets(Sheets.Count)
if reminder="Rows " then reminder="None"
if reminder1="Rows " then reminder1="None"
if reminder2="Rows " then reminder2="None"

Range("A1")= "Due Date past"
Range("b1")=reminder
Range("A1")= "EXPIRY DATE past"
Range("b1")=reminder1
Range("A1")= "RENEWAL DATE past"
Range("b1")=reminder

ActiveWindow.SelectedSheets.PrintOut Copies:=1

end sub


--
If this helps, please remember to click yes.


"Zuke Kahn" wrote:

I have a spreadsheet used for managing dates and deadlines where Column K is for DUE DATE, M for EXPIRY DATE, P for RENEWAL DATE.

What I would like is to have a macro which runs automatically on launch to print a range called "reminder" if DUE DATE has passed today's date. The macro should check all cells in the Column K and then its should start from column M and print a range called "reminder1" if EXPIRY DATE has passed today's date. The macro should check all cells in the Column M and then its should start from column P and print a range called "reminder2" if RENEWAL DATE has passed today's date.


Any help would be most appreciated!

Thanks,


EggHeadCafe - Software Developer Portal of Choice
WCF Workflow Services Using External Data Exchange
http://www.eggheadcafe.com/tutorials...vices-usi.aspx

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
Macros in Personal.xls that would create two toolbars and buttonswith assigned macros Brian Day Excel Programming 1 March 29th 07 11:20 PM
choose default macros Not Enabled / Macros Enable Setting BEEJAY Excel Programming 2 June 30th 06 01:07 PM
weird saving of a document with macros resulting with macros being transfered to the copy alfonso gonzales Excel Programming 0 December 12th 04 09:19 PM
Macros inside macros, and pasting into macro code. pagelocator[_2_] Excel Programming 1 November 24th 04 09:11 AM
Suppress the Disable Macros / Enable Macros Dialog Shoji Karai Excel Programming 5 September 24th 03 03:10 AM


All times are GMT +1. The time now is 01:38 AM.

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"