Debug Print
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 |
Debug Print
When in the Vicual Basic Editor look a tthe bottom of the screen. There
should be a section called the Immeadiate Window. You will see the results of any Debug.Print in that pane. If the immeadiate window is not visible then go to View in the tool bar and select Immeadiate window. Debug Print is used for debugging (fixing errors in code). Mike H. wrote: 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 -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200808/1 |
Debug Print
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 -- HTH, Barb Reinhardt "Mike H." wrote: 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 |
Debug Print
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? |
All times are GMT +1. The time now is 08:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com