Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default help --- Commandbars

Hi,

Could someone tell me why
MsgBox Application.CommandBars("Cell").Controls("Insert.. .").ID
is giving me a invalid procedure call or argument error.

I'm actually trying to disable insert and delete from Cell and Row right
click.

The delete is working fine
Application.CommandBars("Cell").Controls("Delete.. .").enable = False, but
insert gives me the error....

Help
wAyne_
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default help --- Commandbars

Works fine for me.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"wAyne" wrote in message
...
Hi,

Could someone tell me why
MsgBox Application.CommandBars("Cell").Controls("Insert.. .").ID
is giving me a invalid procedure call or argument error.

I'm actually trying to disable insert and delete from Cell and Row right
click.

The delete is working fine
Application.CommandBars("Cell").Controls("Delete.. .").enable = False, but
insert gives me the error....

Help
wAyne_



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default help --- Commandbars

I think you delete it

Run this one time
Application.CommandBars("Cell").Reset

And then try this

Application.CommandBars("Cell").FindControl(ID:=31 81).Enabled = False
Application.CommandBars("Cell").FindControl(ID:=29 2).Enabled = False




--
Regards Ron de Bruin
http://www.rondebruin.nl


"wAyne" wrote in message ...
Hi,

Could someone tell me why
MsgBox Application.CommandBars("Cell").Controls("Insert.. .").ID
is giving me a invalid procedure call or argument error.

I'm actually trying to disable insert and delete from Cell and Row right
click.

The delete is working fine
Application.CommandBars("Cell").Controls("Delete.. .").enable = False, but
insert gives me the error....

Help
wAyne_



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default help --- Commandbars

Hi,

I thought that might be the case -- I had it reset in an earlier part of the
code -- moved it to just before and had the same problems. I then copied
part of the code to a new workbook -- still same result -- even using the IDs
you provided (thanks Ron), I still end up with the same error.....
aaaarrrggghhhh!!

here is my sample code....

Sub test()

Application.CommandBars("Cell").Reset

Application.CommandBars("Cell").FindControl(ID:=29 2).Enabled = False

Application.CommandBars("Cell").Controls("Delete.. .").Enabled = False
Application.CommandBars("Cell").Controls("Insert.. .").Enabled = False

Application.CommandBars("Cell").FindControl(ID:=31 81).Enabled = False

End Sub


Thanks
wAyne_

"Ron de Bruin" wrote:

I think you delete it

Run this one time
Application.CommandBars("Cell").Reset

And then try this

Application.CommandBars("Cell").FindControl(ID:=31 81).Enabled = False
Application.CommandBars("Cell").FindControl(ID:=29 2).Enabled = False




--
Regards Ron de Bruin
http://www.rondebruin.nl


"wAyne" wrote in message ...
Hi,

Could someone tell me why
MsgBox Application.CommandBars("Cell").Controls("Insert.. .").ID
is giving me a invalid procedure call or argument error.

I'm actually trying to disable insert and delete from Cell and Row right
click.

The delete is working fine
Application.CommandBars("Cell").Controls("Delete.. .").enable = False, but
insert gives me the error....

Help
wAyne_




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
Commandbars - again micklloyd[_5_] Excel Programming 4 January 30th 06 08:32 AM
Commandbars PosseJohn Excel Programming 1 December 16th 05 05:51 PM
Commandbars Libby Excel Programming 1 August 8th 04 07:11 PM
CommandBars garry Excel Programming 3 June 24th 04 03:12 PM
CommandBars defj Excel Programming 2 November 16th 03 12:57 AM


All times are GMT +1. The time now is 01:33 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"