Print Page | Close Window

Urgent Help - Ribbon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=15687
Printed Date: 06 October 2024 at 12:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Urgent Help - Ribbon
Posted By: AMSH
Subject: Urgent Help - Ribbon
Date 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



Replies:
Posted By: Oleg
Date Posted: 23 November 2009 at 4:59am
Hi,
 
So are you sure you call it after ID_FORM_CLOSE Action was created ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: AMSH
Date Posted: 23 November 2009 at 6:03am
yes


Posted By: SuperMario
Date Posted: 25 November 2009 at 9:14am
Modify a sample to use your code and attache it here please.


Posted By: AMSH
Date Posted: 06 December 2009 at 4:37am
Originally posted by AMSH AMSH wrote:

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



Here you are.
uploads/20091206_043208_Emp.rar - 20091206_043208_Emp.rar


Posted By: AMSH
Date Posted: 07 December 2009 at 7:31am
Hello...........


Posted By: shipwreck
Date Posted: 10 December 2009 at 6:55am
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


Posted By: Oleg
Date Posted: 11 December 2009 at 2:04am
Hi,
 
You need to enable Actions.
 
Call CommandBars.EnableActions before you create any control.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: AMSH
Date Posted: 15 February 2010 at 6:39am
Originally posted by shipwreck shipwreck wrote:

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


I did that brother, but not working


Posted By: Aaron
Date Posted: 15 February 2010 at 10:09am
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....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net