Home Variables in VBA for Word 2010
Reply: 0

Variables in VBA for Word 2010

user505
1#
user505 Published in May 20, 2018, 11:39 am

I have this code in VBA for Word 2010:

Public LastBodyPage
Sub tryit()
    Selection.GoTo What:=wdGoToBookmark, Name:="AppendixStart"
    LastBodyPage = Selection.Information(wdActiveEndPageNumber)
End Sub

Sub vardel()
    MsgBox Variables.item("LastBodyPage").Value
    MsgBox LastBodyPage
End Sub

When the vardel procedure is run, the first message box displays "53" and the second time it displays "50".

Why am I getting different values??

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.311369 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO