alright guys,
after playing with that for awhile i finally got the code to work the way i wanted it to.....THANKS A TONS GUYS. now how do i get VBA to allow me to use this
for the first part of the worksheet and then
this
for the second part of the work book....so essentially the user will finish the first section and fill out what is necessary and then toggel the second part of the code with a YES or NO in the dropdown box.
Thanks SOOOOO MUCH
after playing with that for awhile i finally got the code to work the way i wanted it to.....THANKS A TONS GUYS. now how do i get VBA to allow me to use this
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rNextCell As Range, bMsg As Boolean
If Not Intersect(Target, Me.Range("mustfill")) Is Nothing Then
Exit Sub
End If
If WorksheetFunction.CountA(Me.Range("mustfill")) <> Me.Range("mustfill").Cells.Count Then
bMsg = False
For Each rNextCell In Me.Range("mustfill").Cells
If Len(rNextCell.Value) = 0 Then
Application.EnableEvents = False
rNextCell.Select
Application.EnableEvents = True
bMsg = True
Exit For
End If
Next rNextCell
If bMsg = True Then
MsgBox "Please fill in required cells before continuing!", vbInformation, "ERROR!"
End If
End If
End Sub
this
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rNextCell As Range, bMsg As Boolean
Dim myRange As Range
If Target.Address = "$A$28" Then Exit Sub
Application.EnableEvents = False
Set myRange = Range("required")
If Me.Range("A28") = "NO" Then
Set myRange = Range("Notrequired")
End If
If Intersect(Target, myRange) Is Nothing Then
If WorksheetFunction.CountA(myRange) <> myRange.Cells.Count Then
bMsg = False
For Each rNextCell In myRange.Cells
If Len(rNextCell.Value) = 0 Then
rNextCell.Select
bMsg = True
Exit For
End If
Next rNextCell
If bMsg Then
MsgBox "Please fill in required cells before continuing!", vbInformation, "ERROR!"
End If
End If
End If
Application.EnableEvents = True
End Sub
Thanks SOOOOO MUCH