Consulting

Results 1 to 5 of 5

Thread: About excel vba objects

  1. #1
    VBAX Regular
    Joined
    Oct 2008
    Posts
    31
    Location

    About excel vba objects

    I'm a vba newbie and I was wondering is it possible to see which are all the available properties or subobjects while writing code. For example, if I write activesheet I would like to see that activesheet contains rows -object and colums -object: activesheet.rows, activesheets.colums

    How can I check which are all the possibilities with activesheet or some other object?

    Thanks in advance!

  2. #2
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    Welcome to the forum! Always good to see new members.

    What you're asking for is called the object browser. You can access it via the VBE. Click Tools -> Object Browser.

    Intellisense will also help you out with parameters when you're writing code, as long as you are using the correct syntax.
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


  3. #3
    VBAX Tutor david000's Avatar
    Joined
    Mar 2007
    Location
    Chicago
    Posts
    276
    Location
    I personally think that it's annoying that ActiveSheet doesn't trigger
    intellisense!


    [vba]Sub objSheet()
    Dim wks As Worksheet 'kind of object?
    Dim wks1 As Worksheet 'kind of object?
    Set wks = ActiveSheet 'set the object
    Set wks1 = Worksheets("Sheet1") 'set the object

    Sheet1.Cells(1, 1) = "foo 1" 'Intellisense works.
    wks.Cells(1, 2) = "foo 2" 'Intellisense works for the wks
    ActiveSheet.Cells(1, 3) = "foo 3" 'Intellisense dosen't work for ActiveSheet without Dim/Set
    Worksheets("Sheet1").Cells(1, 4) = "foo 4" 'Intellisense dosen't work without Dim/Set
    wks1.Cells(1, 5) = "foo 5" 'Intellisense works for the Worksheet("Sheet1")
    End Sub

    [/vba]

  4. #4
    VBAX Regular
    Joined
    Oct 2008
    Posts
    31
    Location
    Thanks! I had a heureka experience wirh the object browser. However, I have problem with the intellisense. When I write "ActiveSheet" I don't get any list of available options. When I "write Dim a as" I get possible options as a list..

  5. #5
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    I have problem with the intellisense. When I write "ActiveSheet" I don't get any list of available options.
    As David pointed out above, ActiveSheet does not trigger intellisense....for whatever reason.
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


Posting Permissions

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