Avatar of Peter Chan
Peter Chan
Flag 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
* Excel TableVBAVisual Basic Classic

Avatar of undefined
Last Comment
Fabrice Lambert

8/22/2022 - Mon
Martin Liss

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.
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
Fabrice Lambert

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy