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 myCell.Select Application.EnableEvents = True Exit Sub End If Next myCell NoRange: Application.EnableEvents = True End Sub
Last edited by a moderator: