Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA variable calculation..

Status
Not open for further replies.

devendrap

Programmer
Aug 22, 2001
50
US
Hi,

I am trying to calculate values in VBA. The following code should get value from "A" variable and calculate for variable "B" = ( A + 10). Some how it is not working. Can you please help me?

Thanks,
Dave

Sub Try()

Dim strYearVals As String
Dim bodvrYear As DocumentVariable
Set bodvrYear = ThisDocument.DocumentVariables("Sigma")

For i = 1 To UBound(bodvrYear.Values(BoAllValues))

ThisDocument.DocumentVariables("trySigma").Values(BoAllValues)(i) = (bodvrYear.Values(BoAllValues)(i) + 10)

Next i


ActiveReport.ForceCompute

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top