View Single Post
 
Old 12-29-2015, 10:52 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Thumbs up

I would do this with a userform - see the basics at http://www.gmayor.com/Userform.htm You can write the results or alternative texts based on the results to bookmarked locations, docvariables or content controls.

Take for example the part of the userform shown on that page to write a value to a bookmark i.e.

Code:
FillBM "bm1", Me.TextBox1.Text
If TextBox1 is your blood pressure field (it helps to use meaningful field names) then you could modify that to

Code:
If Me.TextBox1.Value > 160 Then 
    FillBM "bm1", "Elevated Blood Pressure"
End If
These are just simple examples. You could for example include error handling to ensure only numeric values are entered in the text box. You'll find code for that and other related things at http://www.gmayor.com/useful_vba_functions.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote