Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA question (Excel 2000)

    This annoys me about VBA coding all the time. So I enter someting like "ActiveSheet."...nothing happens. I depend on those properties/methods menus to help me figure out the next step, but I never know whether or not they're going to show up. And when I select the context menu's Show Properties and Methods after highlighting ActiveSheet...nothing happens. So I can never get started learning how these things work. And the help screen doesn't seem to get me too far, either. Perhaps I just need more pain. Any ideas on how to get data on those things? Thanks!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA question (Excel 2000)

    There have been threads about this before. The explanation is that ActiveSheet could be a worksheet, a chart sheet or even an Excel 4 macro sheet or Excel 5 dialog sheet. So IntelliSense doesn't know what kind of sheet it is. A workaround is to define a variable of type Worksheet:

    Dim wsh As Worksheet
    Set wsh = ActiveSheet

    If you type wsh followed by a point, IntelliSense will show a list of properties and methods.

    If you click in Worksheet and press F1, you'll get online help. And if you search for Worksheet in the Object Browser (press F2 to activate it), you'll see a list of available properties and methods.

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA question (Excel 2000)

    Ok. Thanks. Hope to be less "Dim" in the future.

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VBA question (Excel 2000)

    Or maybe it takes more "wsh-ing" for the worksheet to co-operate! <img src=/S/wink.gif border=0 alt=wink width=15 height=15>
    Regards,
    Rudi

Posting Permissions

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