+ Reply to Thread
Results 1 to 15 of 15

Auto Reminder mail from Excel when the PC is powered on or signed in

  1. #1
    Registered User
    Join Date
    01-17-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    12

    Auto Reminder mail from Excel when the PC is powered on or signed in

    Dear Friends,
    I don't know anything about VBA or Macros. But I want the excel to send a reminder e mail 30 days prior to the expiry of an item from a list of items (Column 1). I have googled and found this VBA code. It works fine, but only if I select RUN on the VBA page. I am not sure whether I have done the complete procedure to set it up. I only pasted the code from internet to the Excel VBA page. I opened the VBA page by right clicking the sheet1 tab and selecting view code. To test it I added few more items with expiry date within 30 days and removed all “Y” from column 12. But only the existing items mail was send after selecting “run” from Vb page, not the newly added ones.
    I would like the excel to send e mail to the email address (Column 9) automatically whenever the expiry date (Column 4) is 30 days away and whenever the PC is powered on. Or when the PC is signed in. The PC is always on. I shall upload the file created. Kindly help me to fix it.
    Thanks & Best regards
    Prakash
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Cross-post;http://forum.chandoo.org/threads/aut...m-excel.21752/
    Read this:http://www.excelguru.ca/content.php?184
    Please click the * Add Reputation if this helps
    If solved remember to mark Thread as solved

    "I'm glad to help and this is not meant to sound smart, but either you have super-human vision to see all those controls cleared one by one with the code I posted, or your computer is really slow."

  3. #3
    Registered User
    Join Date
    01-17-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    12

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Dear Blokeman and friends
    this is the first i ever joined a forum. I first joined chandoo.org and posted my query. The forum said there will be a response in 24hrs. Since no response for 3 days, i thought i might have made some mistakes in posting and might have dumped. Hence i posted in Excel forum. I didn't know there is something called cross posting until now. If i have hurt the sentiments and good intentions of good Samaritans of both the forums, please accept my apologies.
    Best regards Prakash

  4. #4
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Paste the code in "ThisWorkbook".

  5. #5
    Registered User
    Join Date
    01-17-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    12

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Sorry Mr. Blokeman
    i di not understand "Paste the code in "ThisWorkbook".
    thanks Pramal11

  6. #6
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in


  7. #7
    Registered User
    Join Date
    01-17-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    12

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Thank You Sir,
    I have read this before and I have pasted the code as it says in the sheet 1.
    Sorry but Kindly advice what went wrong and advice how to correct it. I am novice to Excel, VBA and Marcos. I shall list down what the issues with the attached Excel file (MAA SHELF LIFE).
    1) The code works fine when I select "run" on the VBA page menu bar. It will send a outlook mail to the emil ID in col 9 for any items expiry date is 30 days or lesser away.
    2) But if i add any more items below the existing items with an expiry date 30 days or less, it will not send mail even when i select "run".
    3) I have pasted the code by right clicking the SHEET 1 tab and selecting "view code". I didnt do anything else. did not create a module or name the project. Just pasted the code.
    4) I have edited the code to change the column number to suite my Excel sheet. I guess the code runs fine if I select "run", may be the code is ok.

    What I would wish to have:
    1) If possible the code should run on anybody signing in the PC ( PC is almost allways Power On but signed out) and check the expiry date list (Col 4)and if there is any dates less than 30 days and if there is no "Y" in column 12, send a email reminder to email ID in Col9. Without opening the work book.
    2) In another thread says we can schedule the opening of the workbook daily by scheduler. Not sure how to set up that.

    Thanking You in advance for all your help.
    Best regards Pramal11

  8. #8
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Your code is a Private Sub Workbook_Open so it must be an Excel Events, it run the macro when you open the workbook, if you want this then put the code in ThisWorkbook module. If you put it in sheet module then it run only by user interaction.
    Last edited by Blokeman; 02-09-2015 at 08:13 PM.

  9. #9
    Registered User
    Join Date
    01-17-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    12

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Many Many thanks Sir
    I shall do as advised. Could you kindly advice how to set up scheduler to automatically open the work book and run the marco every day witjout any humans intervention. PC is always on but signed out.
    Thanks again
    pramal11

  10. #10
    Registered User
    Join Date
    01-17-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    12

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Dear Sir,
    As advised I have pasted the code in workbook and it run when ever I open the workbook.
    Would it be possible to set it to run on signing in to the PC.
    Also, What is ment by "For i = 6 To Range("C65536").End(xlUp).Row"
    especially ("C65536"). What is this number specify.
    Many Thanks for your help
    Pramal11

  11. #11
    Registered User
    Join Date
    01-17-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    12

    Smile Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Dear Sir,
    Thanks a TON for your help. I managed to set up the scheduler to open the work book at sign in.
    If you dont mind, Kindly advice what is the number ("C65536") in this part of the code specify "For i = 6 To Range("C65536").End(xlUp).Row".
    Is there any way we could run the code without opening the work book physically. That is open - run the code - close without anyone seeing it.
    Thanks Nd Best Regards Prakash

  12. #12
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    i = 6 start in row 6
    Range("C65536") All the rows in column C
    .End(xlUp).Row it only select cells/rows that have value


    There's no code that I think of that will run the macro when workbook is closed.

    Read this:http://krgreenlee.blogspot.com.au/20...dows-task.html

  13. #13
    Registered User
    Join Date
    01-17-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    12

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Many many thanks Sir for all your help.

  14. #14
    Registered User
    Join Date
    01-17-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    12

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Dear Sir,
    Sorry to bother you again.
    Everything works fine....Thanks to you.
    But after I copy it on a thumb drive and paste it on to another PCs desktop, its opening only in "READ ONLY" mode. I havent protected it. Then I selected "Shear Workbook" saved it and repeted the copying on thumb drive and pasting on new PC. Now its working on the new PC. But I canot see the code in the workbook. But it works fine. Since the work book is in shear mode, I canot protect it or hide the rows containing formulas. Is there any way I could protect the row with formulas, to prevent accidental deletion.
    Thanks in advance for your help.
    Best Regards Pramal11

  15. #15
    Registered User
    Join Date
    01-17-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    12

    Re: Auto Reminder mail from Excel when the PC is powered on or signed in

    Dear Blokeman,
    Would it be possible for the code to check one more column. If the date in that column 6 is todays date minus 2days, it should send a mail to the maild ID in coulmn 10, with the same subject and body as in the existing code. Also repeat the reminder mail on todays date.
    Grateful if you could help.
    My previous mail with file shear issue is still not fixed. I couldnt find a way to fix it.
    Thanks Nd Brgds Pramal11.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Automatic Outlook mail due date reminder based on Excel file
    By iamitp in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-18-2019, 05:51 PM
  2. Further study on Auto-mail for due date reminder
    By samd007 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-16-2013, 11:43 PM
  3. [SOLVED] Excel auto-email after one month (like reminder)
    By 1tane1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2013, 03:23 AM
  4. Set Reminder mail from Excel
    By KDPRASAD in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2012, 03:23 AM
  5. Send reminder mail from excel using outlook
    By arunsny in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2011, 09:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1