PC Review


Reply
Thread Tools Rate Thread

Creating a toolbar that works in Excel 2000 and 2007

 
 
=?Utf-8?B?Qm9uc2FpIEJpbGw=?=
Guest
Posts: n/a
 
      20th Sep 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.

 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      20th Sep 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" <(E-Mail Removed)> wrote in message
news:9F28EF18-7DFA-48E0-A892-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?Qm9uc2FpIEJpbGw=?=
Guest
Posts: n/a
 
      21st Sep 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" <(E-Mail Removed)> wrote in message
> news:9F28EF18-7DFA-48E0-A892-(E-Mail Removed)...
> > 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 With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      22nd Sep 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" <(E-Mail Removed)> wrote in message
news:3E7E8A81-0F2A-4A72-A0DB-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:9F28EF18-7DFA-48E0-A892-(E-Mail Removed)...
>> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code Works Fine in Excel 2007, Excel 2000 generates Runtime Error 438 Safari Microsoft Excel Programming 0 25th Jun 2009 03:53 PM
Transfer Works 2000 .wks files to Excel 2007 walkshaw Microsoft Excel Misc 1 23rd Apr 2009 10:05 AM
VBA code for excel 2000 no longer works in excel 2007 Blaine Microsoft Excel Programming 8 4th Oct 2008 01:45 PM
Creating a custom toolbar add-in in Excel 2007 test_52 Microsoft Excel Programming 1 20th May 2008 04:29 PM
xls file works fine in Excel 2000 and 2007 but crashes on opening in 2003 gromit12 Microsoft Excel Misc 2 6th Nov 2007 09:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:46 PM.