Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 versus Excel 2003 & Excel 97-2003 fully compatible Bumpersnesty Excel Worksheet Functions 0 April 26th 10 09:44 PM
Convert Excel 2003 spreadsheet into Outlook Contacts table 2003 Stuart[_4_] Excel Discussion (Misc queries) 2 October 6th 08 05:07 PM
import Excel 2003 file into Outlook 2003 - NO NAMED RANGES?? lewisma9 Excel Discussion (Misc queries) 0 February 27th 07 12:23 AM
Copying Excel 2003 Selection into Outlook 2003 HTML E-Mail Message [email protected] Excel Discussion (Misc queries) 0 July 10th 06 03:07 PM
Excel 2003 Database Driver Visual FoxPro 7 on Server 2003. Cindy Winegarden Excel Discussion (Misc queries) 0 November 28th 04 12:07 AM


All times are GMT +1. The time now is 04:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"