Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

excell object browser, help

sheets has a name property.  It is used in VBA like this:

    Sheets.Add
    Sheets("Sheet1").Select
    Sheets("Sheet1").Name = "NewName"

Ok, no big deal but how would I know this?  I go into
the object browser and name is not shown as a memeber.
It's subclassed from workbook(s) but I don't see
how any name property I find relates.

How does one investigate all the properties, like a
sheets' name?  If I hadn't seen an example, I never
would have known it existed.

Thanks
0
hank1
Asked:
hank1
  • 4
  • 3
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
While in break mode, use the Locals window (from the View menu).
0
 
hank1Author Commented:
That shows declared variables ...
It doesn't seem to allow me to browse an object
or its properties.
Does it?  How would you find the name property if
you didn't it even existed?

Excell VB rookie
Thanks
0
 
Éric MoreauSenior .Net ConsultantCommented:
You can highlight an object (ie: Sheets(1) ) and press SHIFT-F9 and add it to the watch window. You can then explode it to see all its properties. Notice that you have to be running to see it and the object must be alive. A good place to see it is somewhere like:

   Sheets.Add
   Sheets("Sheet1").Select
   Sheets("Sheet1").Name = "NewName"
   'HERE
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
hank1Author Commented:
I'll give it shot.  Wonder why the object
browser doesn't give up the goods?
0
 
Éric MoreauSenior .Net ConsultantCommented:
Object browser should show them to you but you need to know under which class it is.
0
 
hank1Author Commented:
Wow, there's a mass of stuff in there!
This belongs in the browser!
Thanks for your help.

(Now I have to figure out how to print it for reference.)
0
 
Éric MoreauSenior .Net ConsultantCommented:
I don't think that there is an easy way of printing it.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now