I am surprised that
MsgBox Variables.Item("LastBodyPage").value
produces anything but an error message as the macro does not know from the code you have posted what 'Variables' refers to.
You could have used
MsgBox Activedocument.Variables.Item("LastBodyPage").value
if there was a document variable of that name to refer to, but again there isn't from your code.
Try the following instead
Public LastBodyPage As Integer
Sub tryit()
Selection.GoTo What:=wdGoToBookmark, Name:="AppendixStart"
LastBodyPage = Selection.Information(wdActiveEndPageNumber)
ActiveDocument.Variables.Item("LastBodyPage").value = LastBodyPage
End Sub
Sub vardel()
MsgBox ActiveDocument.Variables.Item("LastBodyPage").value
MsgBox LastBodyPage
End Sub
or better still
Public iLastBodyPage As Integer
Sub tryit()
iLastBodyPage = ActiveDocument.Bookmarks("AppendixStart").Range.Information(wdActiveEndPageNumber)
ActiveDocument.Variables.Item("LastBodyPage").value = iLastBodyPage
End Sub
Sub vardel()
MsgBox ActiveDocument.Variables.Item("LastBodyPage").value
MsgBox iLastBodyPage 'This line seems superfluous
End Sub