'mapatarifas.Get("CP") has no value on database
'if CP has no value then set to empty string
clvLabel4.text= mapatarifas.Getdefault("CP","")
' Ensure that clvLabel4.text has a value and that it's a numeric value
If clvLabel4.Text <> "" And IsNumber(clvLabel4.Text) Then
' Parse the text to a Double before doing the division
Dim laca As Double = clvLabel4.Text
If laca > 0 Then
' Since laca is already a Double, use it directly
clvLabel5.Text = NumberFormat2(laca / ptc, 0, 2, 2, False)
End If
Else
' Handle cases where clvLabel4.Text is not a number or is empty
' You might want to set clvLabel5.Text to some default value or leave it as it is
End If
'this also empty string error
'remove these lines
' Dim laca As Double=clvLabel4.Text
' If laca>0 Then
' clvLabel5.Text= NumberFormat2(clvLabel4.Text/ptc,0,2,2,False)
'End If