![]() |
Excel 95 VBA to 2003 VBA
I have an old application written in Excel 95 VBA and have had to change
the old Toolbar property over to CommandBars, but I am finding that runtime error 5 for invalid procedure is been invoked the xlTop line. I can't find a way around this one. Many thanks Jim With CommandBars(1) .Position = xlTop .Left = 0 End With |
Excel 95 VBA to 2003 VBA
Hi
Sub Macro1() MsgBox CommandBars(1).Name End Sub returns "Worksheet Menu Bar" on my computer. So it's probably not up for much fun and dance. But you should be able to address the one you want by using it's name: MsgBox CommandBars("Drawing").Name -- HTH. Best wishes Harald Followup to newsgroup only please. "Jim" wrote in message . .. I have an old application written in Excel 95 VBA and have had to change the old Toolbar property over to CommandBars, but I am finding that runtime error 5 for invalid procedure is been invoked the xlTop line. I can't find a way around this one. Many thanks Jim With CommandBars(1) .Position = xlTop .Left = 0 End With |
Excel 95 VBA to 2003 VBA
Hi Harald
Not sure I quite understand, this error is part of a close down routine and resets the original toolbar positions, I think. Any ideas? Jim "Harald Staff" wrote in message ... Hi Sub Macro1() MsgBox CommandBars(1).Name End Sub returns "Worksheet Menu Bar" on my computer. So it's probably not up for much fun and dance. But you should be able to address the one you want by using it's name: MsgBox CommandBars("Drawing").Name -- HTH. Best wishes Harald Followup to newsgroup only please. "Jim" wrote in message . .. I have an old application written in Excel 95 VBA and have had to change the old Toolbar property over to CommandBars, but I am finding that runtime error 5 for invalid procedure is been invoked the xlTop line. I can't find a way around this one. Many thanks Jim With CommandBars(1) .Position = xlTop .Left = 0 End With |
All times are GMT +1. The time now is 12:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com