View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.vb.controls
Scott Lyon Scott Lyon is offline
external usenet poster
 
Posts: 20
Default Strange problem with a dynamically populated tabstrip on a worksheet

I take it nobody has dealt with the same error that I'm getting (and posted
about)?

Oh well, guess I'll just tell the customer they have to live with it. :(


Thanks!
-Scott

"Scott Lyon" <scott.lyon_at_rapistan.com.NOSPAM wrote in message
...
I've got an application in Excel (with VBA code behind it), that uses
tabstrips extensively.

For optimum flexibility, I've written the code such that when one of the
worksheets is Activated, it will populate all of the values for the tabs

in
the tabstrip, using the function tabStrip.Tabs.Add, from data stored in
another worksheet

After that, I set the width and height of the tabStrip control itself
(programatically), based on values stored in the other worksheet.


For the most part it works, except lately, when I first go into the
application, even after populating the tabs and setting the width and

height
of the control, it doesn't display properly.

Basically, I want to have a tabstrip that's long (horizontally), but not
very tall. But what I'm seeing, seems to be a corrupted tabStrip (the
correct size) behind an other tabStrip object that is the incorrect size
(much too tall, and nowhere near long enough).

I've attached an image of this to better explain what I mean. If you look

at
the attached image, you'll see what looks like a tabstrip with the tab
marked "Start" visible (but set to display as buttons, not tabs, which is
what I want), and the rest of the tabs are off the tabstrip, because the
strip is too small.

But looking to the right, you can see a gray box (with white and black
"garbage" at the top of it), that is the actual size of the textbox.


Now, even stranger, when I go to another worksheet (which has an exact
duplicate of that tabstrip, and even calling the exact same code to

populate
it), everything looks fine. Stranger even still, if I manually re-size

that
tabStrip to the correct size, it fixes itself.


But I cannot ask the users of the application I'm writing to go in and
manually re-size the tabStrip on the first entry to the program every

time.



Anyone have ideas what is going wrong, or more to the point, how I can fix
it?


Thanks!

-Scott