+ Reply to Thread
Results 1 to 3 of 3

MsgBox Display

Hybrid View

Guest MsgBox Display 06-16-2005, 05:05 PM
bhofsetz Very simply: Sub... 06-16-2005, 05:55 PM
Guest Re: MsgBox Display 06-16-2005, 06:05 PM
  1. #1
    Michael S.
    Guest

    MsgBox Display

    I would like to have a message box display under these conditions.

    Column A = Job Status
    Column B = Date Completed

    If column A = Done and Column B does not have a date of completion then I
    would like to have a msgbox pop up and tell the user they need to put a
    completion date in column B.

    Thank you

  2. #2
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481
    Very simply:

    Sub FillDateCompleted()
    Dim NumRows As Long, x As Long
        NumRows = Cells(Rows.Count, "A").End(xlUp).Row
        For x = 1 To NumRows
          If Range("A" & x) = "Done" And IsEmpty(Range("B" & x)) Then
            Range("B" & x) = InputBox("Enter the Date Completed")
          End If
        Next x
    End Sub
    You can use data validation to ensure a valid date is entered and format the result on your sheet if you like as well.
    You can also have the affected range be highlighted so the user more clearly knows what job they are entering the completion date for.
    You can also add an if statement after the inputbox assignment that makes sure they entered a date.
    But this should get you started

    HTH

  3. #3
    Bob Phillips
    Guest

    Re: MsgBox Display

    Use data validation on A2 with a custom value of =B2<>"", assuming row 2,
    and an appropriate error message

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Michael S." <MichaelS@discussions.microsoft.com> wrote in message
    news:EFBFF095-534D-4E44-9EF3-C2C88E5A0E56@microsoft.com...
    > I would like to have a message box display under these conditions.
    >
    > Column A = Job Status
    > Column B = Date Completed
    >
    > If column A = Done and Column B does not have a date of completion then I
    > would like to have a msgbox pop up and tell the user they need to put a
    > completion date in column B.
    >
    > Thank you




+ 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