+ Reply to Thread
Results 1 to 14 of 14

Having a Message "Anniversary" on the userform if the HireDate equals Current Date?

  1. #1
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Having a Message "Anniversary" on the userform if the HireDate equals Current Date?

    Hi,

    In the Userform, is it possible to have a flashing text popup or message pop when the Hiredate equals the current date saying Anniversary??

    HR Dashboard Master V3.xlsm

    John
    Last edited by JJFletcher; 10-30-2014 at 08:49 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Having a Flashing "Anniversary" on the userform if the HireDate equals Current Date?

    Hello John,

    Formulas can not flash text, manipulate shapes, display dialogs, or control other Excel objects. You would need to create a VBA UserForm to replace what is on the worksheet.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Having a Flashing "Anniversary" on the userform if the HireDate equals Current Date?

    Be aware that flashing cells might cause epileptic reactions with some people ( no joke)

  4. #4
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Having a Flashing "Anniversary" on the userform if the HireDate equals Current Date?

    Hi - So it's not possible to have the field date see if the current date is a match and a popup message launches and says Anniversary

    hhhmmmm....

    John
    Last edited by JJFletcher; 10-30-2014 at 01:57 PM. Reason: spelling

  5. #5
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Having a Flashing "Anniversary" on the userform if the HireDate equals Current Date?

    Is it possible to do an if statement?

  6. #6
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Having a Flashing "Anniversary" on the userform if the HireDate equals Current Date?

    Here's something that might work for you, but you will have to change the cell values to meet your needs.
    It was written to suit just one employee/situation. You will just have to modify the code to loop through a list of employees that you have.

    Assuming Hire Date is in cell A2 and Employee name is in cell C2, put this in the ThisWorkbook module;
    Please Login or Register  to view this content.
    Last edited by Jim885; 10-30-2014 at 04:45 PM.
    If I helped in any way, please click the star

  7. #7
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Having a Flashing "Anniversary" on the userform if the HireDate equals Current Date?

    Can this be used for the Workbook that is attached in this thread?

  8. #8
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Having a Message "Anniversary" on the userform if the HireDate equals Current Date?

    Please Login or Register  to view this content.
    I do not think I understand the sequence of how to write this! The field that is needing to be accessed is in the EmployeeData Spreadsheet and the Userform has the textbox that is linked to the filed in the userform

    John
    Last edited by JJFletcher; 10-30-2014 at 08:52 PM. Reason: spelling

  9. #9
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Having a Message "Anniversary" on the userform if the HireDate equals Current Date?

    John,

    As written, this is a standard macro that will suit your needs and loop through each employee start date looking for the anniversary date. When found, a message box will appear with the name of the employee that is having the anniversary.
    Please Login or Register  to view this content.
    Put this code in the Employee Data worksheet module. You can add a button to the sheet that will trigger this macro to run.
    Other than the method I'm offering you, I don't see a way to make this work within the User Form.
    Last edited by Jim885; 10-30-2014 at 10:49 PM.

  10. #10
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Having a Message "Anniversary" on the userform if the HireDate equals Current Date?

    JIm,

    I really thank you for your response -


    Thanks,

    John
    Last edited by JJFletcher; 10-30-2014 at 11:06 PM.

  11. #11
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Having a Message "Anniversary" on the userform if the HireDate equals Current Date?

    You are welcome.

    You could also make this an event code that would run whenever the workbook is opened.

    I hope this satisifies what you need. If so, please mark this thread as solved.
    Last edited by Jim885; 10-30-2014 at 11:30 PM.

  12. #12
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Having a Message "Anniversary" on the userform if the HireDate equals Current Date?

    Jim, Thanks...

    I really have to try to create a solution in the userform - it works so well - getting the form to provide that data as the code does in the sheet is optimal
    Thanks so much - I know you said there is not way - but maybe another method etc... Your solution actually works fantastic in the EmployeeData sheet...

    John
    Last edited by JJFletcher; 10-30-2014 at 11:41 PM. Reason: correction in text

  13. #13
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Having a Message "Anniversary" on the userform if the HireDate equals Current Date?

    Why can't this be achieved in a listbox in the userform ???

    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Having a Message "Anniversary" on the userform if the HireDate equals Current Date?

    Hi John,
    I thought about for a while, but it would be above my skills to make it work in a User Form, if it is even possible. I also see it getting complicated, time consuming and require a modification of the User Form, as well as incorporating the additional code into the code behind the User Form.

    You could possibly avoid all that by putting a button in the User Form that will run the code I gave you. I see that you attached your name to several of the other codes in the workbook. So I'm sure you could add a button to run the code, if you want to consider that option.

    Or maybe you can start another thread and someone else can assist you so that it appears in a text box.

    The advise everyone else gave you to avoid the flashing text is in your best interest. No programmer likes flashing text. It requires a timer to be set within the code, and the code has to keep running to make the text flash. That will interfere with the User Form and the ability to use the worksheet.

    I happen to have two examples of code for blinking cells / text for you regarding your request for flashing text. I did not write these codes. I found them on the internet. They were written by very talented people who also advised against using flashing text. Here they are;
    Please Login or Register  to view this content.
    and;

    Please Login or Register  to view this content.
    You can find several more of them if you google "vba blinking text"
    You will also see that many well respected people advise against it for many reasons.

    Thanks for the rep! Much appreciated.
    Best of luck to you.
    Last edited by Jim885; 10-31-2014 at 11:17 AM. Reason: added code

+ 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. Using "AND," "OR," and "TODAY()" in conditional formatting
    By KArnoldColumbia in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-18-2013, 01:17 PM
  2. condit. format: If date in cell = today, display "Today"
    By ratkins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2013, 01:33 PM
  3. "IF()" function using "TODAY()" to produce a value in days
    By Rob.Marchel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-06-2012, 09:12 PM
  4. VBA Code for a "Today's Date" box in a userform?
    By themikeford in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2012, 09:10 PM
  5. Replies: 3
    Last Post: 03-10-2005, 05:06 AM

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