Code: Select all
Dim pgText As TextFrame2
Dim plotSheet As String
plotSheet = "Plots"
' Update page numbers on the plots.
i = 0
For Each objShp In Worksheets(plotSheet).Shapes
i = i + 1
Set pgText = ActiveSheet.Shapes(objShp.Name).GroupItems("PageNo").TextFrame2
pgText.TextRange.Characters.Text = "Page " & CStr(i) & " of " & CStr(maxNumPlot)
Next