Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - How to get CommandBarEdit Text?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to get CommandBarEdit Text?

 Post Reply Post Reply
Author
Message
Bernie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 July 2007
Location: Taiwan
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bernie Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
XpatTech View Drop Down
Groupie
Groupie
Avatar

Joined: 26 November 2007
Location: United Kingdom
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote XpatTech Quote  Post ReplyReply Direct Link To This Post 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 ?
Back to Top
Bernie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 July 2007
Location: Taiwan
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bernie Quote  Post ReplyReply Direct Link To This Post Posted: 11 December 2007 at 8:16am
ID_FGENERATOR_GEN <> .FindControl(ID_FGENERATOR_EDIT)
Back to Top
XpatTech View Drop Down
Groupie
Groupie
Avatar

Joined: 26 November 2007
Location: United Kingdom
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote XpatTech Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.