Search ideas to by pass Bug "OnAction" with parameters XP/ XL2K SP3

J

john2

I am searching any ideas to by pass the bug with "OnAction" with
parameters on XL 2000 SP3
The bug is that nothing is happening consecutively to a click on a
custom Control Button menu.
It's work fine with XL 2000 SP2 and XL2003, unfortunatuly I have to
use XL 2000 SP3.
In my code there is a lot of control menu button affected with this
action property. If I can't pass the parameters to my Sub, I will have
to write as many Sub as existing cases (800 Sub in my example).
Is there another light method to solve this difficulty?
My program in a few words is:
On the current Cell selected I would want to affect to this one, a
specific list. This specific list is chosen with the help of a button
menu (msoControlButton) located in a tree menu.

My code structure is:

Sub CreatMenuNiveauTapRoom(NiveauSec, VarObj3, i, j)
For i = 1 To 20
For j = 1 To 12
VarObj2 = VarObj1 & ".Room" & j
Set VarObj2 = VarOjb1.Controls.Add(Type:=msoControlButton)
TapRefRoom = "TapRefRoom" & j & NiveauSec & i

With VarObj2
.Caption = "Tap." & NiveauSec & ".BL" & i & ".Room" & j
'Passage de 3 paramètres à la procédure Insertlist
.OnAction = "'InsertList """ & NiveauSec & """,""" & i &
""",""" & j & """'"
End With

Next j
Next i
End Sub

Sub InsertList(NiveauSec, i, j)

TapRefRoom = "TapRefRoom" & j & NiveauSec & i
With Selection.Validation
.Delete

.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween, Formula1:="=" & TapRefRoom

End With
End Sub

Thanks to any advises


Jean.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top