Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Creating a toolbar that works in Excel 2000 and 2007

Could someone please point me to sample code that generates a toolbar that
will work in both 2000 and 2007? Until 2007 the following code worked well:
With Application.CommandBars
With .Add(mcstrToolbarName, , False, True)
.Visible = True
.Position = msoBarBottom
With .Controls
With .Add(msoControlButton)
.Caption = " Inventory exam items and build exam "
.FaceId = 592
.OnAction = "MainProgram"
......................
......................
End With
End with
End with

Is there another option that would be clean and more compatable? If so, I
would appreciate being pointed to some sample code.

Thanks for any help on this! I am somewhat lost in finding compatible code.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Creating a toolbar that works in Excel 2000 and 2007

All the nice commandbar code developed for Excel 97-2003 doesn't work in
Excel 2007. For pseudo-compatibility, if the commandbars and menus you
created in past versions wasn't too complex, you get the various buttons
appearing on a ribbon tab called "Add-Ins". It's not as flexible and
convenient as in prior versions, and I've had lots of code that worked just
fine in 2000-2003 just fall down in 2007.

There are ways to develop custom ribbons in 2007, and some utilities are
starting to become available. One nice one was constructed by Patrick Schmid
(Google his name or "ribboncustomizer"). The XML code for this lives in the
new Office file format.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Bonsai Bill" wrote in message
...
Could someone please point me to sample code that generates a toolbar that
will work in both 2000 and 2007? Until 2007 the following code worked
well:
With Application.CommandBars
With .Add(mcstrToolbarName, , False, True)
.Visible = True
.Position = msoBarBottom
With .Controls
With .Add(msoControlButton)
.Caption = " Inventory exam items and build exam "
.FaceId = 592
.OnAction = "MainProgram"
.....................
.....................
End With
End with
End with

Is there another option that would be clean and more compatable? If so, I
would appreciate being pointed to some sample code.

Thanks for any help on this! I am somewhat lost in finding compatible
code.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Creating a toolbar that works in Excel 2000 and 2007

Thanks Jon for your reply. I feel like I have been cut off at the knees
regarding having compatible code. I am going to have to rethink how I present
macro options. I would be interested if you or others have found satisfactory
alternatives.

Thanks for your help.

"Jon Peltier" wrote:

All the nice commandbar code developed for Excel 97-2003 doesn't work in
Excel 2007. For pseudo-compatibility, if the commandbars and menus you
created in past versions wasn't too complex, you get the various buttons
appearing on a ribbon tab called "Add-Ins". It's not as flexible and
convenient as in prior versions, and I've had lots of code that worked just
fine in 2000-2003 just fall down in 2007.

There are ways to develop custom ribbons in 2007, and some utilities are
starting to become available. One nice one was constructed by Patrick Schmid
(Google his name or "ribboncustomizer"). The XML code for this lives in the
new Office file format.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Bonsai Bill" wrote in message
...
Could someone please point me to sample code that generates a toolbar that
will work in both 2000 and 2007? Until 2007 the following code worked
well:
With Application.CommandBars
With .Add(mcstrToolbarName, , False, True)
.Visible = True
.Position = msoBarBottom
With .Controls
With .Add(msoControlButton)
.Caption = " Inventory exam items and build exam "
.FaceId = 592
.OnAction = "MainProgram"
.....................
.....................
End With
End with
End with

Is there another option that would be clean and more compatable? If so, I
would appreciate being pointed to some sample code.

Thanks for any help on this! I am somewhat lost in finding compatible
code.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Creating a toolbar that works in Excel 2000 and 2007

I have only one client using Excel 2007 at this point, and he's barely using
it yet. I had two others, but one switched back right away, and the other is
getting ready to. The problem is that Excel 2007 has broken and bent
behaviors that in the past were well understood, and so far there aren't
even workarounds for many of the intentional and inadvertent changes. (For
example, charts behave differently, code behaves differently, the whole user
interaction is completely twisted.) Changes are minor, but still mean you
have to tinker under the hood of a great many existing, working solutions.

Basically, I don't have a strategy yet. There are enough differences between
UIs in 2003 and 2007 that I would consider supporting two versions of a
utility, so that changes to adapt of one versions UI wouldn't hose the
other's.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Bonsai Bill" wrote in message
...
Thanks Jon for your reply. I feel like I have been cut off at the knees
regarding having compatible code. I am going to have to rethink how I
present
macro options. I would be interested if you or others have found
satisfactory
alternatives.

Thanks for your help.

"Jon Peltier" wrote:

All the nice commandbar code developed for Excel 97-2003 doesn't work in
Excel 2007. For pseudo-compatibility, if the commandbars and menus you
created in past versions wasn't too complex, you get the various buttons
appearing on a ribbon tab called "Add-Ins". It's not as flexible and
convenient as in prior versions, and I've had lots of code that worked
just
fine in 2000-2003 just fall down in 2007.

There are ways to develop custom ribbons in 2007, and some utilities are
starting to become available. One nice one was constructed by Patrick
Schmid
(Google his name or "ribboncustomizer"). The XML code for this lives in
the
new Office file format.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Bonsai Bill" wrote in message
...
Could someone please point me to sample code that generates a toolbar
that
will work in both 2000 and 2007? Until 2007 the following code worked
well:
With Application.CommandBars
With .Add(mcstrToolbarName, , False, True)
.Visible = True
.Position = msoBarBottom
With .Controls
With .Add(msoControlButton)
.Caption = " Inventory exam items and build exam "
.FaceId = 592
.OnAction = "MainProgram"
.....................
.....................
End With
End with
End with

Is there another option that would be clean and more compatable? If so,
I
would appreciate being pointed to some sample code.

Thanks for any help on this! I am somewhat lost in finding compatible
code.






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
"If function" works in Excel 2000 but not in 2007 Allen Excel Worksheet Functions 7 October 10th 09 07:16 PM
Transfer Works 2000 .wks files to Excel 2007 walkshaw Excel Discussion (Misc queries) 1 April 23rd 09 10:05 AM
xls file works fine in Excel 2000 and 2007 but crashes on opening in 2003 gromit12 Excel Discussion (Misc queries) 2 November 6th 07 09:30 PM
Creating Toolbar on Word 2000 using built-in Visual Basic Editor Sagar Gadre Excel Programming 1 September 10th 04 02:19 PM
creating Toolbar on Word 2000 using built-in Visual Basic Editor sagarsehwag Excel Programming 0 August 22nd 04 02:22 PM


All times are GMT +1. The time now is 11:40 PM.

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

About Us

"It's about Microsoft Excel"