sankar_bhatta
New Member
- Joined
- May 5, 2021
- Messages
- 4
Hi All,
i am a newbie to VBA and find thread on this forum very helpful. I am developing a macro to validate soem fields in excel. one of the column in this excel can haev a date type of data( please note the format of this field is not date ).
I am reading the whole data of the excel into a array of type VARIANT. i am then passing the specific columns to another sub where I am using IsDate function to validate if this ia date. But the function IsDate is always returning false
I tried CDate etc. but nothing seems to work
Sub Validate_Contracts_EffectiveDate(par1 As Variant)
If IsDate(par1) = False Then
lv_error = True
lv_err_text = "only date format is allowed"
End If
end Sub
i am a newbie to VBA and find thread on this forum very helpful. I am developing a macro to validate soem fields in excel. one of the column in this excel can haev a date type of data( please note the format of this field is not date ).
I am reading the whole data of the excel into a array of type VARIANT. i am then passing the specific columns to another sub where I am using IsDate function to validate if this ia date. But the function IsDate is always returning false
I tried CDate etc. but nothing seems to work
Sub Validate_Contracts_EffectiveDate(par1 As Variant)
If IsDate(par1) = False Then
lv_error = True
lv_err_text = "only date format is allowed"
End If
end Sub