Results 1 to 1 of 1

Thread: Validating multiple cells before proceeding

  1. #1
    Acolyte tigerdel's Avatar
    Join Date
    Aug 2012
    Excel Version
    Office 365

    Validating multiple cells before proceeding

    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have built a validation so that if a user fails to answer a question then they cannot move to next screen and it works fine

    My problem is that there are 10 questions on the page and I want to check that all questions have been answered and if not it changes the font to red and the user cannot connot until all questions are answered.

    Once all question are answered the font returns to black and moves to next sheet

    Any ideas please??

    Sub NEXT2()
    Dim celltxt As String
    celltxt = ActiveSheet.Range("BG9").Text              ‘select cell
    If InStr(1, celltxt, "FALSE") Then                        ‘check to see if it has this value
    MsgBox ("Please answer Question 1")                  ‘if Yes then this message
    ActiveSheet.Range("A9").Select                         ‘select question cell
    Range("A9").Select                                          ‘select the cell
    With Selection.Font                                                       
    .Color = -16776961                                          ‘change font to red
    .TintAndShade = 0
    End With
    With Selection.Font
    .ColorIndex = xlAutomatic
    .TintAndShade = 0'
    Sheets("TNA2").Select                                      ‘otherwise move to next sheet
    End If
    End Sub
    Last edited by tigerdel; 2012-09-06 at 01:51 PM.

Posting Permissions

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