Home All Groups Group Topic Archive Search About

First time tabstrip attempt

Author
20 May 2009 1:36 PM
MP
I just copied sample from msdn help and get syntax error at Dim statement...
??? what's up with that?
Private Sub Form_Load()

   'this was copied from help but next line is syntax error!?!?!?!
   Dim tabx as Tab

....
    Set tabx = TabData.Tabs.Add()
  etc....

End Sub

i think the tab strip is from microsoft. windows common controls 5.0(sp2)
there are apparently others, maybe i'm using the wrong one???

I don't see why that would be an error?

mark

Author
21 May 2009 3:41 PM
Jan Hyde
"MP" <Nospam@Thanks.com>'s wild thoughts were released on
Wed, 20 May 2009 08:36:09 -0500 bearing the following fruit:

Show quoteHide quote
>I just copied sample from msdn help and get syntax error at Dim statement...
>??? what's up with that?
>Private Sub Form_Load()
>
>   'this was copied from help but next line is syntax error!?!?!?!
>   Dim tabx as Tab
>
>...
>    Set tabx = TabData.Tabs.Add()
>  etc....
>
>End Sub
>
>i think the tab strip is from microsoft. windows common controls 5.0(sp2)
>there are apparently others, maybe i'm using the wrong one???
>
>I don't see why that would be an error?
>
>mark

Possibly the SSTab. Can you post the entire example from the
help?


--
Jan Hyde
Author
21 May 2009 6:59 PM
Nobody
"MP" <Nospam@Thanks.com> wrote in message
news:OoEWc$U2JHA.140@TK2MSFTNGP03.phx.gbl...
>I just copied sample from msdn help and get syntax error at Dim
>statement...
> ??? what's up with that?
> Private Sub Form_Load()
>
>   'this was copied from help but next line is syntax error!?!?!?!
>   Dim tabx as Tab

Try including the library name from Object Browser(F2):

Dim tabx As ComctlLib.Tab

VB6 objects to it because it conflicts with Tab() function. Whenever you
reference two libraries that define the same symbol, use the library name.
Author
22 May 2009 12:57 AM
MP
aha!
thanks
mark

Show quoteHide quote
"Nobody" <nob***@nobody.com> wrote in message
news:%23UwiEZk2JHA.5276@TK2MSFTNGP04.phx.gbl...
> "MP" <Nospam@Thanks.com> wrote in message
> news:OoEWc$U2JHA.140@TK2MSFTNGP03.phx.gbl...
> >I just copied sample from msdn help and get syntax error at Dim
> >statement...
> > ??? what's up with that?
> > Private Sub Form_Load()
> >
> >   'this was copied from help but next line is syntax error!?!?!?!
> >   Dim tabx as Tab
>
> Try including the library name from Object Browser(F2):
>
> Dim tabx As ComctlLib.Tab
>
> VB6 objects to it because it conflicts with Tab() function. Whenever you
> reference two libraries that define the same symbol, use the library name.
>
>
>
>