G
Guest
For various reasons I want to cahnge the height and top values of a tab
control as pages are selected.
The design values in twips are:
TabCtl.Top = 5430
TabCtl.Height = 3465
When I click on tab 5 (tabctl.value=5) I change the properties to:
TabCtl.Top = 5430
TabCtl.Height = 3465
and it works well.
When I press one of the other tabs it fails with the following error message:
Run-time error 2100 "The control or subform control is too large for this
location."
The code I use is:
If TabCtl.Value <> 5 Then
TabCtl.Height = 2835
TabCtl.Top = 6060
Else
TabCtl.Top = 5430
TabCtl.Height = 3465
End If
Notice if value<>5 that I reduce the Height BEFORE increasing Top property.
If I break at "TabCtl.Top = 6060" the Height is still 3465 and NOT 2835.
Is this weird or what?
control as pages are selected.
The design values in twips are:
TabCtl.Top = 5430
TabCtl.Height = 3465
When I click on tab 5 (tabctl.value=5) I change the properties to:
TabCtl.Top = 5430
TabCtl.Height = 3465
and it works well.
When I press one of the other tabs it fails with the following error message:
Run-time error 2100 "The control or subform control is too large for this
location."
The code I use is:
If TabCtl.Value <> 5 Then
TabCtl.Height = 2835
TabCtl.Top = 6060
Else
TabCtl.Top = 5430
TabCtl.Height = 3465
End If
Notice if value<>5 that I reduce the Height BEFORE increasing Top property.
If I break at "TabCtl.Top = 6060" the Height is still 3465 and NOT 2835.
Is this weird or what?