How can I read the value of a Textfield, which is placed in a ribbon?

S

sasan sepahbodi

Hi Friends,



Office 2010

Win7

VBA



Do you hav an Idea? Is it possible?




I will be very glad to get an answer!



Tanx!!



Sasan
 
J

Jim Rech

I'm not aware of a textfield control. If you mean an editbox then-

First specify an onChange handler in your ribbonx (here "EditChg"):

<editBox id="MyEditbox" label="Enter Text" onChange="EditChg"/>

and add a sub with that name to your VB code:

Sub EditChg(control As IRibbonControl, text As String)
MsgBox text
End Sub

When a user enters text and presses Enter (or changes the focus) the sub
will be called.
 
S

sasan sepahbodi

Tanx a lot for posting!

You are right, I mean an editBox. Sorry.

I know this way! But to make what I need, is this way to complicated. I
hoped, there is a way to read the editBox directly.

Some how.


Sasan
 
J

Jim Rech

But to make what I need, is this way to complicated.

One line of code is too complicated? <g>

I don't know of any other way.
 
S

sasan sepahbodi

Hi Jim,



Pleas don’t misunderstand me. It’s not because of own line of code. I
explain you what I want to do.



There are a lot of word templates for a lot of companies on lot of different
locations.



So, I offer a ribbon with some dropdown menus for different templates,
companies and locations. In this way, I have to write all the parts of my
path to an INI-File and read it from INI to build my path to the right
template. I have also to keep the path for the next visit of user.



I was pretty sure, there is no way to read the editBox or dropdown, but I
was not absolutely sure! I know help myself.



How ever, thank you for your time.

I wish you a nice weekend.



Sasan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top