R
Ram
In this code my range Module_2(cell name), is in a different
worksheet(Path_Module). How do I declare it. This code is searching
for Module_2 on the same worksheet where the command button is
present. Hence i get error "Range not found".
Private Sub CommandButton1_Click()
Dim Rng As Range
Dim Rng2 As Range
Set Rng = Me.Range("Module_2") '<<=== CHANGE
On Error Resume Next
Set Rng2 = Rng.SpecialCells(xlCellTypeBlanks)
On Error GoTo 0
If Not Rng2 Is Nothing Then
MsgBox Prompt:="All of the fields " _
& "Learning Path name, Availability date and
Domain" _
& " should be filled.", _
Buttons:=vbInformation, _
Title:="Missing Data"
Rng2.Cells(1).Select
Exit Sub
End If
Me.Next.Select
End Sub
Thanks a lot for help.
worksheet(Path_Module). How do I declare it. This code is searching
for Module_2 on the same worksheet where the command button is
present. Hence i get error "Range not found".
Private Sub CommandButton1_Click()
Dim Rng As Range
Dim Rng2 As Range
Set Rng = Me.Range("Module_2") '<<=== CHANGE
On Error Resume Next
Set Rng2 = Rng.SpecialCells(xlCellTypeBlanks)
On Error GoTo 0
If Not Rng2 Is Nothing Then
MsgBox Prompt:="All of the fields " _
& "Learning Path name, Availability date and
Domain" _
& " should be filled.", _
Buttons:=vbInformation, _
Title:="Missing Data"
Rng2.Cells(1).Select
Exit Sub
End If
Me.Next.Select
End Sub
Thanks a lot for help.