Results 1 to 4 of 4

Thread: vb variable types

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2011
    Posts
    2

    vb variable types

    Hi,

    I am just getting into VB6 and having a go at .net.As with all programming langs there are a list of variable types.To date I am familiar with types such as INT,VAR,STRING and the like.
    To declare these variables I use the DIM as[vartype]
    HoHi,
    http://www.vbexplorer.com/VBExplorer...er_ADO_DAO.asp

    and she mentions other variable types i.e

    Dim ws as Workspace
    Dim db as Database

    This has confused me a bit.I can understand placing a database into an array,but the array will already have been declared,and what does Workspace mean.Is there a whole series of variable types that I have missed out on,or do these variable types belong to a sub-technology of vb6.

    Hope this makes sense
    Regards
    Richard

  2. #2
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: vb variable types

    They don't belong to VB6 as they are, instead both Workspace & Database are objects that come outside VB6. To use these they require that a specific reference (DLL, TLB, OLB) or control (OCX or DLL) is included to a project. There are also TLB reference files that can provide an interface to Windows API functions.

    So, you include a custom control or reference into a project that provide a compatible interface and then you can use them from VB6 as if they were part of the language.


    You can use Object Browser (View > Object Browser, or press F2) to see all the defined interfaces (objects, methods etc.) you can currently use. These include many VB6 built-in features, but you can also select a specific referenced file to see what it has.
    Last edited by Merri; Feb 12th, 2011 at 05:32 AM.

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2011
    Posts
    2

    Re: vb variable types

    Hi there Merri,
    Thankyou for that answer that has cleared things up.

    Kind Regards
    Jim

  4. #4
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: vb variable types

    Now that we've helped you, you can help us by marking the thread as resolved. If you have JavaScript enabled you can do that by selecting the Mark Thread Resolved item from the Thread Tools menu. Otherwise please insert "[Resolved]" at the start of the Subject and select the green checkmark from the Post Icons. Also if someone has been particularly helpful you have the ability to affect their forum "reputation" by rating their post. Only those ratings that you give after you have 20 posts will actually count, but in all cases the person you rate will see your rating and know that you appreciate their help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width