petedw
06-01-2005, 02:34 AM
Hi,
I have the set up the following VBA Code;
Public Sub Pence()
Dim strStatus As String
strStatus = ActiveDocument.FormFields("pence3").Result
If strStatus = "0.00" Then
ActiveDocument.FormFields("dualcharge1").Result = "0.00"
Else
ActiveDocument.FormFields("dualcharge1").Result = ""
End If
End Sub
This works fine but i need a little extra adding. I need the Else command to do exactly what it says UNLESS ActiveDocument.FormFields("dualcharge1") already has a value. Is there a way of doing this?: pray2:
Many Thanks
Pete
I have the set up the following VBA Code;
Public Sub Pence()
Dim strStatus As String
strStatus = ActiveDocument.FormFields("pence3").Result
If strStatus = "0.00" Then
ActiveDocument.FormFields("dualcharge1").Result = "0.00"
Else
ActiveDocument.FormFields("dualcharge1").Result = ""
End If
End Sub
This works fine but i need a little extra adding. I need the Else command to do exactly what it says UNLESS ActiveDocument.FormFields("dualcharge1") already has a value. Is there a way of doing this?: pray2:
Many Thanks
Pete