Unloading control arrays on sstab control error 
Author Message
 Unloading control arrays on sstab control error

I have a form that has the MS Tab ActiveX control v6.0 (sp5)
On tab 3 I have a textbox control array and 2 cmd buttons.
the only textbox loaded at design time is txtbox(0)
On tab 1 I have 1 cmd button.

At runtime
On tab 3
Press cmdButton1 and it creates 10 textboxes

Private Sub Command1_Click()

For i = 1 To 10

  Load TextBox1(i)

  TextBox1(i).Top = RichTextBox1(i - 1).Top + 600

  TextBox1(i).Left = i * 500

  TextBox1(i).Visible = True


End Sub

Press Button 2 and I unload the 10 text boxes

Private Sub Command3_Click(index As Integer)

For i = 1 To 10

  Unload RichTextBox1(i)


End Sub

Runs Just fine...

Now heres the problem

Create the 10 textboxes

Goto tab 1

I have a button their that runs the same unload code as above.

the code runs but as soon as I click on tab 3 to see if the textboxes
unloaded VB Crashes with a memory error.

"the instruction at 0x200018f8 referanced memory at 0x0000000c. the memory
could not be read."

Windows 2000 / VB6 SP5

Am I Unloading them wrong?

Anyone know how to fix this or work around it?


Heath Johnson

Mon, 09 Aug 2004 02:32:20 GMT  
 Unloading control arrays on sstab control error
Hi Heath,

This looks like a known problem.  You could try either moving the textboxes
to a very negative left value or make the textboxes invisible by setting
their visible property to false.

Sorry for the inconvenience.


Marc Rodman
Microsoft Developer Support

Mon, 09 Aug 2004 04:48:03 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Unloading a control member of a control array via API

2. Dynamically Loaded/Unloaded Controls using SSTab and Frames

3. Control Array & SSTab

4. VB5: Unload Control Array

5. VB5: Unloading Control Array

6. unloading controls in array by property

7. SSTab as a control array

8. Dynamic creation of Control Array on a SSTab

9. ActiveX Control Array / Unloading causes crashing

10. Unable to unload control array.

11. gpg unload event of form with control array

12. Control Arrays and SSTab


Powered by phpBB® Forum Software