Debug Print

M

Mike H.

What does "debug print" do? Nothing seems to come out on the printer. So
where does it print to?

I found this code on a posting from a while back but I get an error (Runtime
Error 438, Object doesn't support this property or method) when running it:

For Each ctl In Application.Commandbars("Worksheet Menu
Bar").Controls"File").Controls
Debug.Print ctl.Name, ctl.Id
Next Ctl
 
B

Barb Reinhardt

If you don't see the Immediate window, press CTRL G to display it within the
VBE.

Try this for code

Sub test()
Dim Ctl As CommandBarControl
For Each Ctl In Application.CommandBars("Worksheet Menu Bar").Controls
Debug.Print Ctl.Index, Ctl.ID, Ctl.Caption
Next Ctl
End Sub
 
M

Mike H.

I see the stuff in Immediate. If I want to get this same info for the "Send
To" options on the File Menu, how would I do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top