mmsamaddar
New Member
- Joined
- May 26, 2015
- Messages
- 14
Here is my generic code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address = "$c$4" Then GoTo DOM
DOM:
ActiveSheet.Unprotect Password:="123"
Dim x As Integer
Dim i As Integer
Dim dt As Date
dt = Range("C4").Value
x = Day(DateSerial(Year(CDate(dt)), Month(CDate(dt)) + 1, 1) - 1)
Rows("14:44").EntireRow.Hidden = True
Rows("14:" & x + 13).EntireRow.Hidden = False
Application.ScreenUpdating = True
ActiveSheet.Protect Password:="123"
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("G4").Value < Range("G3").Value Then
MsgBox "Congratulations!!! You Have Crossed Last Month's Commission Just Now"
End If
End Sub
Can anybody help? Thanks in advance
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address = "$c$4" Then GoTo DOM
DOM:
ActiveSheet.Unprotect Password:="123"
Dim x As Integer
Dim i As Integer
Dim dt As Date
dt = Range("C4").Value
x = Day(DateSerial(Year(CDate(dt)), Month(CDate(dt)) + 1, 1) - 1)
Rows("14:44").EntireRow.Hidden = True
Rows("14:" & x + 13).EntireRow.Hidden = False
Application.ScreenUpdating = True
ActiveSheet.Protect Password:="123"
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("G4").Value < Range("G3").Value Then
MsgBox "Congratulations!!! You Have Crossed Last Month's Commission Just Now"
End If
End Sub
Can anybody help? Thanks in advance