By: Lutfor Rahman Shimanto

In reply to Franky Lam.

Hello FRANKY LAM

Thanks for visiting our blog and sharing your problem. Based on your problem, it seems the VBA User-defined function named Code128 is not recalculating on your system.

So, you can try forced fully recalculating using the CalculateFull property of the Excel Application.

Follow these steps: Right-click on the sheet name tab >> Click on View Code >> Paste the following code in the sheet module and Save:

Private Sub Worksheet_Change(ByVal Target As Range)
Call ForcedReCalculation
End Sub

Sub ForcedReCalculation()
Application.CalculateFull
End Sub

Hopefully, the idea will help you good luck.

Regards
Lutfor Rahman Shimanto
Excel & VBA Developer
ExcelDemy