Link to home
Start Free TrialLog in
Avatar of Peter Chan
Peter ChanFlag for Hong Kong

asked on

Data issue in Excel file

Hi,
I do not know why it is having data issue to save attached file.


Asset Template HK.xlsm
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

In your Validate_List sub you refer to a variable named TotRow. When the workbook is closed the Validate_List sub is called and if TotRow has not been set to some value the line
Range3 = "a2:a" & Trim(CStr(TotRow))

Open in new window

resolves to a2:a0 which is invalid.
Avatar of Peter Chan

ASKER

But I have got Type mismatch error to 2nd line below
        If Trim(CStr(Worksheets("Main Sheet").Cells(RowID, 19).Value)) <> "" Then
            i_Day = Now() - Worksheets("Main Sheet").Cells(RowID, 19).Value

Open in new window

while Worksheets("Main Sheet").Cells(RowID, 19).Value is having value 30/04/2021. What is the reason of this?
ASKER CERTIFIED SOLUTION
Avatar of Fabrice Lambert
Fabrice Lambert
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial