+ Reply to Thread
Results 1 to 8 of 8

Warning / Error alert

Hybrid View

  1. #1
    Registered User
    Join Date
    06-30-2009
    Location
    Southern California, Earth
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Warning / Error alert

    Hi. You would simply add the additional conditions.

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        If ActiveCell.Column = 12 Then MsgBox "Check you have used the correct column"
        If ActiveCell.Column = 4 Then MsgBox "Check you have used the correct column"
        If ActiveCell.Column = 5 Then MsgBox "Check you have used the correct column"
    End Sub

  2. #2
    Registered User
    Join Date
    06-30-2009
    Location
    Southern California, Earth
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Warning / Error alert

    Or you can shorten it up a little bit:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        If ActiveCell.Column = 12 Or ActiveCell.Column = 4 _
        Or ActiveCell.Column = 5 Then MsgBox "Check you have used the correct column"
    End Sub

  3. #3
    Registered User
    Join Date
    10-11-2009
    Location
    london, englans
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Warning / Error alert

    Thanks for all your help. You have all been great!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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