Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Invalid procedure call or argument

Check your RemoveOSIMenubar routine. It's not removing the
"OSILogInsertROw" CommandBar.


In article ,
salgud wrote:

I've tried at least a dozen variations on creating this command bar, none
of which works:

Sub CreateOSIMenubar()

Dim vMacNames As Variant
Dim vCapNames As Variant
Dim vTipText As Variant
Dim cbOSI As CommandBar
Call RemoveOSIMenubar

vMacNames = "OSILogInsertRow"
vCapNames = "OSILogInsertRow"
vTipText = "Add Row"
Set cbOSI = CommandBars.Add
With cbOSI
.Name = vMacNames <--- Invalid Procedure call or argument
.Left = 200
.Top = 200
.Protection = msoBarNoProtection
.Visible = True
.Position = msoBarTop
.Left = CommandBars("FormatDGB").Left + CommandBars("FormatDGB").Width
.RowIndex = CommandBars("FormatDGB").RowIndex
End With
With CommandBars("OSILogInsertRow").Controls.Add(Type:= msoControlButton)
.OnAction = "'" & ThisWorkbook.Name & "'!" & "OSILogInsertRow"
.Caption = vCapNames
.Style = msoButtonCaption
.TooltipText = vTipText
End With
End Sub

I've typed in the text string instead of the variable, changed the variable
to a string, etc, etc.
Does anyone see what's wrong here?

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
CreatePivotTable: Invalid procedure call or argument DesertCyclist Excel Programming 4 October 15th 10 03:53 PM
Invalid Procedure Call Or Argument with VBScript [email protected] Excel Programming 0 November 28th 07 01:50 PM
Invalid procedure call or argument error Patrick Simonds Excel Programming 1 August 12th 06 11:40 PM
Invalid Procedure call or argument T De Villiers[_58_] Excel Programming 1 July 25th 06 03:01 PM
Run Time Error 5 - Invalid Procedure Call or Argument Q John[_110_] Excel Programming 3 September 26th 05 09:47 PM


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