![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I have a form with two pages - that is, the height of the form is about two screen heights and it has a PageBreak half way down. I move between the pages with: Me.GoToPage 1 and Me.GoToPage 2 The user will select the page from a button on a custom CommandBar How can I get VBA to tell me which page is currently being displayed? I cannot find a property like "CurrentPage". All the properties to do with pages seem to relate to pages on Tab Controls. If there was a "CurrentPage" property, I could use code like: If Me.CurrentPage = 1 Then Do something Else Do something different End If Is there a way to achieve the result I want? |
#3
| |||
| |||
|
|
Adrian wrote: Hello, I have a form with two pages - that is, the height of the form is about two screen heights and it has a PageBreak half way down. I move between the pages with: Me.GoToPage 1 and Me.GoToPage 2 The user will select the page from a button on a custom CommandBar How can I get VBA to tell me which page is currently being displayed? I cannot find a property like "CurrentPage". All the properties to do with pages seem to relate to pages on Tab Controls. If there was a "CurrentPage" property, I could use code like: If Me.CurrentPage = 1 Then Do something Else Do something different End If Is there a way to achieve the result I want? If Screen.ActiveControl.Top < Me.PageBreakControl.Top Then Page=1 else Page=2 end if -- This sig left intentionally blank |
#4
| |||
| |||
|
|
This sig left intentionally blank That should be, "This sig intentionally left blank", should it not? |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
"Trevor Best" <nospam (AT) besty (DOT) org.uk> wrote in message -- This sig left intentionally blank That should be, "This sig intentionally left blank", should it not? |
#7
| |||
| |||
|
|
Trevor, 'If Screen.ActiveControl.Top < Me.PageBreakControl.Top Then ' Page = 1 'Else ' Page = 2 'End If Many thanks for this ingenious response. It was not my intention to start a thread about the position of adverbs. |
#8
| |||
| |||
|
|
Adrian wrote: Trevor, 'If Screen.ActiveControl.Top < Me.PageBreakControl.Top Then ' Page = 1 'Else ' Page = 2 'End If Many thanks for this ingenious response. It was not my intention to start a thread about the position of adverbs. Don't sweat it :-) |
#9
| |||
| |||
|
|
I guess we're just syntactical folks. |
![]() |
| Thread Tools | |
| Display Modes | |
| |