ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Looking for a MSDN article. (https://www.excelbanter.com/excel-programming/362507-looking-msdn-article.html)

Zoo

Looking for a MSDN article.
 
Hi all,

The code written below works well on my computer with Excel 2000 SP1.
It does not work on the same machine with Excel 2000 SP3 (Excel.exe file
version:9.0.0.6627)
It works well on the same machine with Excel 2000 SP3 sercurity
update(Excel.exe file version:9.0.0.8216).

And I'm looking for the MSDN article concerning this in order to report the
phenomenon to my client.
In http://support.microsoft.com/kb/830349/ , there's no such article.
Does anyone know about that?

'-----This code adds a menu on the worksheet menu bar.
'And when you click [Test]-[DisplayTestMessage] ,
''OK' is displayed unless your Excel is Excel 2000 SP3 early version



Public Const sMenuBarName As String = "Test"

Sub AddMenu()

Set cstMenu = Application.CommandBars("Worksheet Menu
Bar").Controls.Add(Type:=msoControlPopup, temporary:=True)
cstMenu.Caption = sMenuBarName

With cstMenu
Set cstChildMenu = .Controls.Add(Type:=msoControlButton)
cstChildMenu.Visible = True
cstChildMenu.Caption = "DisplayTestMessage"
cstChildMenu.OnAction = "'Test ""OK""'"
End With
End Sub

Public Sub Test(ByVal sStr as String)
MsgBox(sStr)
End Sub

Sub DeleteMenu()
Application.CommandBars("Worksheet Menu Bar").Controls(sMenuBarName).Delete
End Sub


Bob Phillips

Looking for a MSDN article.
 
I found the article fine, heading

Description of the Excel 2000 Security Patch: November 11, 2003

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"Zoo" wrote in message
...
Hi all,

The code written below works well on my computer with Excel 2000 SP1.
It does not work on the same machine with Excel 2000 SP3 (Excel.exe file
version:9.0.0.6627)
It works well on the same machine with Excel 2000 SP3 sercurity
update(Excel.exe file version:9.0.0.8216).

And I'm looking for the MSDN article concerning this in order to report

the
phenomenon to my client.
In http://support.microsoft.com/kb/830349/ , there's no such article.
Does anyone know about that?

'-----This code adds a menu on the worksheet menu bar.
'And when you click [Test]-[DisplayTestMessage] ,
''OK' is displayed unless your Excel is Excel 2000 SP3 early version



Public Const sMenuBarName As String = "Test"

Sub AddMenu()

Set cstMenu = Application.CommandBars("Worksheet Menu
Bar").Controls.Add(Type:=msoControlPopup, temporary:=True)
cstMenu.Caption = sMenuBarName

With cstMenu
Set cstChildMenu = .Controls.Add(Type:=msoControlButton)
cstChildMenu.Visible = True
cstChildMenu.Caption = "DisplayTestMessage"
cstChildMenu.OnAction = "'Test ""OK""'"
End With
End Sub

Public Sub Test(ByVal sStr as String)
MsgBox(sStr)
End Sub

Sub DeleteMenu()
Application.CommandBars("Worksheet Menu

Bar").Controls(sMenuBarName).Delete
End Sub





All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com