I create a simple multipage form named frmHelp with two tabs, Help and About. I assign two shortcut keys, SHFT+CTL+H and SHFT+CTL+A, to recall either of the tabs, respectively. I am trying to pass the index to MultiPage.Value so that the appropriate page can be loaded, but the value of iPage always return 'null.' Any suggestions on how this can be achieved?
Can I re-initialize the form each time as my code suggests? Thanks already. :wink:
ThisWorkbook Module:
frmHelp Module:
Module 1:
Can I re-initialize the form each time as my code suggests? Thanks already. :wink:
ThisWorkbook Module:
Code:
Public iPage as Integer
.
.
Application.OnKey "+^{A}", "AboutPage"
Application.OnKey "+^{H}", "HelpPage"
.
.
Code:
Private Sub UserForm_Initialize()
'MsgBox iPage 'DEBUG
MultiPage1.Value = iPage
End Sub
Code:
Sub AboutPage()
iPage = 1
frmHelp.Show
End Sub
Sub HelpPage()
iPage = 0
frmHelp.Show
End Sub