I need to be able to force the user to fill in specific cells in the row,
from drop down boxes, as they move across the worksheet. If they do not
choose from the drop-down box, I need the cursor to stay in that cell and
force them to choose. Ive got coding for a single Cell.
Put the following line in a standard module:
Public checkit As Boolean
Put the following worksheet event macro in the worksheet code area:
[VBA]
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set b9 = Range("B9")
Set t = Target
If Intersect(t, b9) Is Nothing Then
If checkit Then
If b9.Value = "" Then
Application.EnableEvents = False
b9.Select
Application.EnableEvents = True
Else
checkit = False
End If
End If
Else
checkit = True
End If
End Sub
[/VBA]
However i want to use it on around 5 different cells within the sheet.
I tried copying the same forumla with different cells. but i get a error message of "compile error: ambiguous name Worksheet_SelectionChange(ByVal Target As Range) HELP please?