Add in Express -Office and .net communication between controls on commandbar

Add-in Express™ Support Service
That's what is more important than anything else

Add in Express -Office and .net communication between controls on commandbar
 
Brian Mal Matthews


Guest


(Sorry - I put this question in the wrong forum)
Hi,
I am ashamed to ask this as it is such an utterly basic question but I have two controls on a commandbar - a textbox and a button. I simply want to be able to take user inputted text from the textbox and do stuff with it when the button is clicked. I have no idea how to pick up the text from the textbox. The button works, i.e. it pops up a little messagebox but I can't get it to pop up the messagebox with the text from the textbox in it!
Is there an event handler I need that I'm missing?
Apologies, I'm no programmer and I'm foundering here!
Thanks in advance,
Boz.
Posted 08 Jun, 2010 01:30:44 Top
Eugene Astafiev


Guest


Hi Brian,

Please try using the Text property of the AddinExpress.MSO.ADXCommandBarEdit class.
Posted 08 Jun, 2010 03:23:24 Top
Brian Mal Matthews


Guest


Hi Eugene,
Thanks for your prompt response. I have inserted an AdxCommandBarEdit control onto the Command Bar. I now have a few lines of code in the click event of a button on the command bar - something like this:

dim strtext as string
strtext = AdxCommandBarEdit1.text
msgbox(strtext)


The msgbox just comes up empty.
I have the same question with finding out what date was selected in a datetimepicker placed on the commandbar!

Thanks,

Brian.
Posted 08 Jun, 2010 09:53:12 Top
Eugene Astafiev


Guest


Hi Brian,

The msgbox just comes up empty.


Please try pressing the Enter button after you typed a text.

I have the same question with finding out what date was selected in a datetimepicker placed on the commandbar!


The System.Windows.Forms.DateTimePicker is a standard .net control. Please use the Value property.
Posted 08 Jun, 2010 10:59:23 Top
Brian Mal Matthews


Guest


Hi Eugene,
I can't believe it was as straight forward as that! I really appreciate your help.

Thank you!

Brian.
Posted 08 Jun, 2010 11:18:56 Top
Eugene Astafiev


Guest


You are welcome, Brian :-)
Posted 08 Jun, 2010 11:23:13 Top