Easier one...Select Case


Posted by Cory on July 19, 2001 1:20 PM

What's wrong with this code?:

Private Sub MultiPage1_Change()
Select Case MultiPage1.Value
Case "0"
MultiPage1.Height = 123.75
frmPage1.Height = 206.25
cmdCall.Top = 164.25
cmdClose.Top = 164.25
cmdFinish.Top = 164.25
Case Else
MultiPage1.Height = 243
cmdClose.Top = 283.5
cmdFinish.Top = 283.5
cmdCall.Top = 283.5
frmPage1.Height = 324.75
End Select

I have a form with a multipage on it, and when this form loads, it's short. Upon changing to page2 the form expands along with its controls. The code above was an attempt to change the form and controls back to its starting size if the user goes back to page1, but...

Thanks,
Cory



Posted by Damon Ostrander on July 19, 2001 11:36 PM

Cory,

Well, one thing that pops right out is that you test MultiPage.Value against "0", which is the zero text character. I believe the Value property of the MultiPage object is an integer, so just change the "0" to 0 and at least that should now work.

Damon