Print Page | Close Window

How to get CommandBarEdit Text?

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=7920
Printed Date: 17 June 2025 at 1:57pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to get CommandBarEdit Text?
Posted By: Bernie
Subject: How to get CommandBarEdit Text?
Date Posted: 02 September 2007 at 9:58am
In a Sub, I declare a local variable : Dim cbEditBox As CommandBarEdit
 
Then I created a TextBox:
 
                  Set cbEditBox = .Add(xtpControlEdit, 60026, "Quality")
                  cbEditBox.ShowSpinButtons = True
                  cbEditBox.Text = 10
                  cbEditBox.Width = 120
 
My question is,
how can I get the Text value of the TextBox in somewhere else?
 
I tried .Findcontrol(,60026) but there's no Text property.



Replies:
Posted By: Oleg
Date Posted: 03 September 2007 at 7:29am
Hi,
When you use Findcontrol also declate CommandBarEdit type:
 
Dim cbEditBox As CommandBarEdit
Set cbEditBox  = .FindControl(...)
cbEditBox .Text = ...


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


Posted By: XpatTech
Date Posted: 09 December 2007 at 10:58am
Case ID_FGENERATOR_GEN
Dim cbEditBox As CommandBarEdit
Set cbEditBox = CommandBars.FindControl(ID_FGENERATOR_EDIT)
cbEditBox.Text = 50


and it does absolutely nothing.. Any ideas ?


Posted By: Bernie
Date Posted: 11 December 2007 at 8:16am
ID_FGENERATOR_GEN <> .FindControl(ID_FGENERATOR_EDIT)


Posted By: XpatTech
Date Posted: 11 December 2007 at 8:28am
Figured out that if i change the above to

Case ID_FGENERATOR_GEN
Dim cbEditBox As CommandBarEdit
Set cbEditBox = CommandBars.FindControl(,ID_FGENERATOR_EDIT)
cbEditBox.Text = 50

it works fine.



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