Results 1 to 8 of 8

Thread: Help with manditory fill cells

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Help with manditory fill cells

    I am currently using this code on a worksheet to make sure all the cells in the range (mustfill) are filled in with out moving on to the next cell in the range unless the previous is filled in. however this isnt very user friendly because you cant go to a previously filled in cell and change it if you have made a mistake untill all the fields are filled. does anyone have a code that will allow me to use the ("MustFill") range but be allowed to change a previously entered required field while moving through the range?


    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
         Dim myCell As Range
         Dim myRange As Range
         On Error GoTo NoRange
         If Range("B10").Value <= 0 Then Exit Sub
         Set myRange = Range("MustFill")
         For Each myCell In Range("MustFill")
              If myCell.Value = "" Then
              Application.EnableEvents = False
              Application.EnableEvents = True
              Exit Sub
         End If
         Next myCell
         Application.EnableEvents = True
    End Sub
    Last edited by Zack Barresse; 2011-03-22 at 08:20 PM. Reason: Added CODE tags

Posting Permissions

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