+ Reply to Thread
Results 1 to 5 of 5

How to avoid running userform if there's not date on particular column?

  1. #1
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    How to avoid running userform if there's not date on particular column?

    Giday to you all

    I'm trying to create a spread sheet for the supervisor so he can keep track of all the work orders he sent.

    I have succussfully made all the userforms to appear if the date is out of due in Column E.

    But trouble is if there is no date, an error will appear so I have to enter a hidden date in E2.

    Is there any way to avoid userforms to appear if there is no dates from E3?

    Thank you in advance.

    Attachment 237652
    Last edited by unley; 05-23-2013 at 06:54 AM.
    I'm using MS Office 2013

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: How to avoid running userform if there's not date on particular column?

    Just add another If/Then.
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    Re: How to avoid running userform if there's not date on particular column?

    Hi Tinbendr

    Thank you for replying but there's bug in the code in Workbook.

    Can you have another look please? Thank you very much

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to avoid running userform if there's not date on particular column?

    Don't use Userforms for something as simple as popping up a message for an OK click. Also, better to mark these events as the sheet is activated by the user rather than a bunch of popups when the workbook is opened.

    I've changed your DUEDATE macro to one that accepts two parameters: The name of the worksheet and the number of days to offset. In each sheet module there is now a simple "Activate" macro that will call the DUEDATE macro when the sheet is activated. It will color the dates older than the offset you've chosen and color them red IF they are not already red. If they are already red, they will not be painted again nor will they trigger the popup message.

    You'll also notice you no longer need a fake date in E2 to start.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    Re: How to avoid running userform if there's not date on particular column?

    Update:

    Thank you very much for your help JBeaucaire, much appreciated.

    and thank you for your time

    Cheers

    Unley
    Last edited by unley; 05-23-2013 at 06:54 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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