[Solved] Format textbox as percentage
Posted: Wed Aug 30, 2017 8:06 pm
I not sure how to format a textbox value for percentage.
this is what I have thus far:
this is what I have thus far:
Code: Select all
Sub oPct
oDoc = ThisComponent
oDocView = oDoc.getCurrentController()
oForm = oDoc.drawpage.forms(0)
tbp = oForm.getbyname("tbp")
tbr = oForm.getbyname("tbr")
tbd = oForm.getbyname("tbd")
tbp.text = (tbr.value - tbd.value) / tbr.value * 100
tbp.text format ("percent")
End Sub