Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Dim as CommandBar Does not Work

Hi there,

I'm trying to add a new menubar with menu items and i was trying to use one
of the procedures that I found in Excel 2002 VBA but it does not seem to work
for some reason. In that procedure you should define one of your variables
as command bar:

dim xxx as CommandBar

And for some reason it does not seem to work with me, VBA does not seem to
recognize the CommandBar type of objects.

Does this mean that I have incomplete installation of VBA or there is a bug
with Office 2003 that I'm using. Or, microsofy has deleted CommandBar type
of objects from its VBA code.

Can anybody help me with that.

Regards
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Dim as CommandBar Does not Work

correction - I forgot to use the vbModeless argument


Userform1.show vbModeless
Application.Wait(Now + TimeValue("0:00:10"))
Unload Userform1

--
Regards,
Tom Ogilvy

"Omar" wrote in message
...
Hi there,

I'm trying to add a new menubar with menu items and i was trying to use

one
of the procedures that I found in Excel 2002 VBA but it does not seem to

work
for some reason. In that procedure you should define one of your

variables
as command bar:

dim xxx as CommandBar

And for some reason it does not seem to work with me, VBA does not seem to
recognize the CommandBar type of objects.

Does this mean that I have incomplete installation of VBA or there is a

bug
with Office 2003 that I'm using. Or, microsofy has deleted CommandBar

type
of objects from its VBA code.

Can anybody help me with that.

Regards



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Dim as CommandBar Does not Work

Tom,

I think your talking to the wrong guy, what you're saying has nothing to do
with my problem.

Regards,

"Tom Ogilvy" wrote:

correction - I forgot to use the vbModeless argument


Userform1.show vbModeless
Application.Wait(Now + TimeValue("0:00:10"))
Unload Userform1

--
Regards,
Tom Ogilvy

"Omar" wrote in message
...
Hi there,

I'm trying to add a new menubar with menu items and i was trying to use

one
of the procedures that I found in Excel 2002 VBA but it does not seem to

work
for some reason. In that procedure you should define one of your

variables
as command bar:

dim xxx as CommandBar

And for some reason it does not seem to work with me, VBA does not seem to
recognize the CommandBar type of objects.

Does this mean that I have incomplete installation of VBA or there is a

bug
with Office 2003 that I'm using. Or, microsofy has deleted CommandBar

type
of objects from its VBA code.

Can anybody help me with that.

Regards




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Dim as CommandBar Does not Work

Yes, my mistake.

--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
correction - I forgot to use the vbModeless argument


Userform1.show vbModeless
Application.Wait(Now + TimeValue("0:00:10"))
Unload Userform1

--
Regards,
Tom Ogilvy

"Omar" wrote in message
...
Hi there,

I'm trying to add a new menubar with menu items and i was trying to use

one
of the procedures that I found in Excel 2002 VBA but it does not seem to

work
for some reason. In that procedure you should define one of your

variables
as command bar:

dim xxx as CommandBar

And for some reason it does not seem to work with me, VBA does not seem

to
recognize the CommandBar type of objects.

Does this mean that I have incomplete installation of VBA or there is a

bug
with Office 2003 that I'm using. Or, microsofy has deleted CommandBar

type
of objects from its VBA code.

Can anybody help me with that.

Regards





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Dim as CommandBar Does not Work

Omar,

The commandbars are part of the Microsoft Office ? Object Library.

In the VBE, use Tools | References.... and put a check next oto Microsoft
Office ? Object Library. The ? will be 11 for Office 2003, IIRC.

HTH,
Bernie
MS Excel MVP

"Omar" wrote in message
...
Hi there,

I'm trying to add a new menubar with menu items and i was trying to use

one
of the procedures that I found in Excel 2002 VBA but it does not seem to

work
for some reason. In that procedure you should define one of your

variables
as command bar:

dim xxx as CommandBar

And for some reason it does not seem to work with me, VBA does not seem to
recognize the CommandBar type of objects.

Does this mean that I have incomplete installation of VBA or there is a

bug
with Office 2003 that I'm using. Or, microsofy has deleted CommandBar

type
of objects from its VBA code.

Can anybody help me with that.

Regards





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Dim as CommandBar Does not Work

Now it works perfectly, Thanks

But i don't know why would microsoft makes the default installation without
that thing clicked - do you know why?

"Bernie Deitrick" wrote:

Omar,

The commandbars are part of the Microsoft Office ? Object Library.

In the VBE, use Tools | References.... and put a check next oto Microsoft
Office ? Object Library. The ? will be 11 for Office 2003, IIRC.

HTH,
Bernie
MS Excel MVP

"Omar" wrote in message
...
Hi there,

I'm trying to add a new menubar with menu items and i was trying to use

one
of the procedures that I found in Excel 2002 VBA but it does not seem to

work
for some reason. In that procedure you should define one of your

variables
as command bar:

dim xxx as CommandBar

And for some reason it does not seem to work with me, VBA does not seem to
recognize the CommandBar type of objects.

Does this mean that I have incomplete installation of VBA or there is a

bug
with Office 2003 that I'm using. Or, microsofy has deleted CommandBar

type
of objects from its VBA code.

Can anybody help me with that.

Regards




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Dim as CommandBar Does not Work

References are associated with the workbook in which they are stored. But
for every version of Excel that I have worked with, the default is for it to
be selected.

--
Regards,
Tom Ogilvy

"Omar" wrote in message
...
Now it works perfectly, Thanks

But i don't know why would microsoft makes the default installation

without
that thing clicked - do you know why?

"Bernie Deitrick" wrote:

Omar,

The commandbars are part of the Microsoft Office ? Object Library.

In the VBE, use Tools | References.... and put a check next oto

Microsoft
Office ? Object Library. The ? will be 11 for Office 2003, IIRC.

HTH,
Bernie
MS Excel MVP

"Omar" wrote in message
...
Hi there,

I'm trying to add a new menubar with menu items and i was trying to

use
one
of the procedures that I found in Excel 2002 VBA but it does not seem

to
work
for some reason. In that procedure you should define one of your

variables
as command bar:

dim xxx as CommandBar

And for some reason it does not seem to work with me, VBA does not

seem to
recognize the CommandBar type of objects.

Does this mean that I have incomplete installation of VBA or there is

a
bug
with Office 2003 that I'm using. Or, microsofy has deleted CommandBar

type
of objects from its VBA code.

Can anybody help me with that.

Regards






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
Comboxbox in Commandbar Bhavtosh Excel Programming 3 January 20th 05 03:19 PM
CommandBar code does NOT work if Excel is Already Open :( sbriscoe Excel Programming 5 July 30th 04 03:33 AM
commandbar Greg Prost[_2_] Excel Programming 2 November 21st 03 11:42 AM
Moving CommandBar using VBA or C# Aaron Queenan Excel Programming 1 October 31st 03 03:20 PM
Add control to commandbar Dan[_20_] Excel Programming 2 August 27th 03 04:47 PM


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

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"