C
CBrausa
I want to have certain cells in a form I am building to be a mandatory
fill in. I know _very_ little about VBA, I copied this from my Excel
book.
How / where do I put in the information as to what cell/cells I want
included?
A few months ago I made it work, now I don't know how I did it.
Private Sub Worksheet_Slecetionchange(ByVal Target As Range)
Dim myCell As Range
Dim myRange As Range
On Error GoTo NoRange
Set myRange = Range("MustFill")
For Each myCell In Range("MustFill")
If myCell.Value = "" Then
Application.EnableEvents = Flase
myCell.Select
Application.EnableEvents = True
Exit Sub
End If
Next myCell
NoRange:
Application.EnableEvents = True
End Sub
fill in. I know _very_ little about VBA, I copied this from my Excel
book.
How / where do I put in the information as to what cell/cells I want
included?
A few months ago I made it work, now I don't know how I did it.
Private Sub Worksheet_Slecetionchange(ByVal Target As Range)
Dim myCell As Range
Dim myRange As Range
On Error GoTo NoRange
Set myRange = Range("MustFill")
For Each myCell In Range("MustFill")
If myCell.Value = "" Then
Application.EnableEvents = Flase
myCell.Select
Application.EnableEvents = True
Exit Sub
End If
Next myCell
NoRange:
Application.EnableEvents = True
End Sub