Lookup Macro

P

Poli

Using MS Word 2007 and Window's XP

I had this macro written into one of my programs and it will lookup fields
and replace the MAX, or Min Value. I need to convert it into Word. Can
someone help me? Thank you. I have another post that also reads "Lookup Macro
but forgot that I had this other program where I had already done this I just
don't know how to convert it into Word.

GLOBAL varMAX_A
GLOBAL varMIN_A

Sub GetMinMaxValueA()

Dim EntryFlag As Boolean
EntryFlag = False

varMAX_A = 0
varMIN_A = 9999.99


If Application.activeform.Fields("LBSIN_A").contents <> 0 Then
If Application.activeform.Fields("LBSIN_A").contents > varMAX_A Then
varMAX_A = Application.activeform.Fields("LBSIN_A").contents
End If
If Application.activeform.Fields("LBSIN_A").contents < varMIN_A Then
varMIN_A = Application.activeform.Fields("LBSIN_A").contents
End If
EntryFlag = True
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top