CurrentPage, PageCount Properties Example
The following example shows how to use the CurrentPage and PageCount properties to navigate to a page within a snapshot file.
Sub Navigate()
Dim lngPageNum As Long
Dim snpCtl As SnapshotViewer
Set snpCtl = Me.SnapShot1.Object
lngPageNum = InputBox("Enter snapshot page to display")
If IsNumeric(lngPageNum) And Len(lngPageNum) > 0 Then
If lngPageNum <= snpCtl.PageCount Then
snpCtl.CurrentPage = lngPageNum
Else
Msgbox "Please enter a value between 1 and " _
& snpCtl.PageCount
Exit Sub
End If
End If
End Sub