Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jun 2003
    Location
    New Jersey
    Posts
    103
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Excel VB code (Excel 2000)

    Hello All,

    I have a position request form I am preparing in Excel. One of the fields an individual will need to complete is Division. I set up the division field as a drop down list using the Data~ Validation properties. What I would like to do is add a pop up box with a message to appear only if Division code = 33 - Sales Division. Can anyone help me with this? I attached the test excel form for your reference.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel VB code (Excel 2000)

    How about this in the worksheet change event routine:

    <code>
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("B15")) Is Nothing Then Exit Sub
    If Target.Value = "33 - Sales Division" Then
    MsgBox "33 - Sales Division"
    End If
    End Sub
    </code>

    To put that in the worksheet change event routine, copy the code, then right click on the worksheet tab and click on "View code" in the popup menu. Paste the code there.
    Legare Coleman

  3. #3
    2 Star Lounger
    Join Date
    Jun 2003
    Location
    New Jersey
    Posts
    103
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Excel VB code (Excel 2000)

    Thank you!!!!!

    It worked, I can't thank you enough
    <img src=/S/fanfare.gif border=0 alt=fanfare width=31 height=23>

Posting Permissions

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