I try to a create a workbook for my requirement. The first sheet include a cell which type is 'Text' and it is for DATE value.
I add Workbook_Open method for set today date when open the workbook as shown below.
Private Sub Workbook_Open()
Sheet1.Range("F6") = Date
End Sub
And I also add Worksheet_Change method for sheet of that cell. That is for validation check as below.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$6" Then
'Getting insertion date.
insertionDate = Sheet1.Range("F6")
'If date field is not empty
If insertionDate <> "" Then
Call MsgBox("Insertion Date must be inserted.")
End If
End If
End Sub
After that, I tested my code. When open the work book, I got the following error.
Run-time error '28':
Out of stack space
When click 'Debug' button, the cursor shown at the first line of Worksheet_Change method.
I has tried everything what I thought. But nothing is going on. Help me. Thank You.