![]() |
How to get CommandBarEdit Text? |
Post Reply
|
| Author | |
Bernie
Senior Member
Joined: 05 July 2007 Location: Taiwan Status: Offline Points: 109 |
Post Options
Thanks(0)
Quote Reply
Topic: How to get CommandBarEdit Text?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.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 September 2007 at 7:29am |
|
Hi,
When you use Findcontrol also declate CommandBarEdit type:
Set cbEditBox = .FindControl(...)
cbEditBox .Text = ...
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
XpatTech
Groupie
Joined: 26 November 2007 Location: United Kingdom Status: Offline Points: 37 |
Post Options
Thanks(0)
Quote Reply
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 ? |
|
![]() |
|
Bernie
Senior Member
Joined: 05 July 2007 Location: Taiwan Status: Offline Points: 109 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 December 2007 at 8:16am |
|
ID_FGENERATOR_GEN <> .FindControl(ID_FGENERATOR_EDIT)
|
|
![]() |
|
XpatTech
Groupie
Joined: 26 November 2007 Location: United Kingdom Status: Offline Points: 37 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
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 |