Solved

excell object browser, help

Posted on 2001-07-27
7
136 Views
Last Modified: 2010-05-02
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
Comment
Question by:hank1
  • 4
  • 3
7 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6327448
While in break mode, use the Locals window (from the View menu).
0
 
LVL 1

Author Comment

by:hank1
ID: 6328735
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
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 6328750
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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 1

Author Comment

by:hank1
ID: 6328774
I'll give it shot.  Wonder why the object
browser doesn't give up the goods?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6328782
Object browser should show them to you but you need to know under which class it is.
0
 
LVL 1

Author Comment

by:hank1
ID: 6328816
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
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6328850
I don't think that there is an easy way of printing it.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now