Urgent Help - Ribbon |
Post Reply |
Author | |
AMSH
Groupie Joined: 27 June 2007 Location: Yemen Status: Offline Points: 20 |
Post Options
Thanks(0)
Posted: 22 November 2009 at 7:50am |
Please Help...
I want to create a tag value for all RibbonBar buttons Dim Action As CommandBarAction Set Action = CommandBars.Actions(ID_FORM_CLOSE) Action.Tag = 999 But this message appears when I run the program at that's code "Object variable or with block variable not set" VB6 v 13.2.1 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
So are you sure you call it after ID_FORM_CLOSE Action was created ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
AMSH
Groupie Joined: 27 June 2007 Location: Yemen Status: Offline Points: 20 |
Post Options
Thanks(0)
|
yes
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Modify a sample to use your code and attache it here please.
|
|
AMSH
Groupie Joined: 27 June 2007 Location: Yemen Status: Offline Points: 20 |
Post Options
Thanks(0)
|
Here you are. 20091206_043208_Emp.rar |
|
AMSH
Groupie Joined: 27 June 2007 Location: Yemen Status: Offline Points: 20 |
Post Options
Thanks(0)
|
Hello...........
|
|
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
|
Try referencing the control a different way AMSH.
Example: Dim Action As CommandBarAction Set Action = CommandBars.Actions(ID_FORM_CLOSE) commandbars.findcontrol ("Control Type", ID_FORM_CLOSE).tag = 999 |
|
Product: Xtreme Suite Pro (Active-X), Version 15.3.1
Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You need to enable Actions.
Call CommandBars.EnableActions before you create any control.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
AMSH
Groupie Joined: 27 June 2007 Location: Yemen Status: Offline Points: 20 |
Post Options
Thanks(0)
|
I did that brother, but not working |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
You have to call CommandBars.EnableActions BEFORE !!! you create any control. That is what Oleg said and I looked into your project and I don't see CommandBars.EnableActions at all.
Just add CommandBars.EnableActions somewhere before adding controls to Commandbars and it will work
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |