Re: How do I perform calculations from the result of a drop-down f by HowardInformationFirst
HowardInformationFirst
Mon Mar 13 11:26:26 CST 2006
Thankyou for your response, I`ll try it out tomorrow, but it makes sense to me!
Cheers Helmut.
"Helmut Weber" wrote:
> Hi Howard,
>
> >_Any_ ideas would be very much appreciated!
>
> if so then, e.g., like this:
>
> Sub Macro1()
> Dim l As Long
> With ActiveDocument.Range.FormFields
> l = CLng(.Item("Dropdown1").Result)
> .Item("text1").Result = Format(l * 2, "0000")
> End With
> End Sub
>
> Whereby Macro1 is the on-exit-macro of dropdown1.
>
> In Drowdown1 I have "0001", "0002", "0003", "0004",
> therefore the conversion to a long number.
>
> In Text1 I'll get "0002", "0004", "0006", "0008".
>
> The formatting is because I want to prevent the formfields
> from changing their size.
>
>
> HTH
>
> --
> Greetings from Bavaria, Germany
>
> Helmut Weber, MVP WordVBA
>
> Win XP, Office 2003
> "red.sys" & Chr$(64) & "t-online.de"
>