Sub pagNames_PageChanged(OldPage As Int, NewPage As Int)
Log("pagNames = " & OldPage & " - " & NewPage)
Dim total As Long = Refresh_tableNAMES((NewPage - 1) * TABLE_STEP)
Dim Current_TotalNumberOfPages As Long = Ceil(total/TABLE_STEP)
Log("Current_TotalNumberOfPages = " & Current_TotalNumberOfPages)
If Current_TotalNumberOfPages <> pagNames.GetTotalNumberOfPages Then
pagNames.SetTotalNumberOfPages(Current_TotalNumberOfPages)
NewPage = 0
End If
pagNames.SetActivePage(NewPage)
pagNames.Refresh
End Sub