WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Detecting or reading the name of a textbox

 
Goto page Previous  1, 2
   Home -> Office -> User Forms RSS
Next:  Winword 7 Fancy Window Title  
Author Message
fumei via OfficeKB.com

External


Since: Sep 21, 2007
Posts: 24



(Msg. 9) Posted: Mon Jun 30, 2008 6:55 pm
Post subject: Re: Detecting or reading the name of a textbox [Login to view extended thread Info.]
Archived from groups: microsoft>public>word>vba>userforms (more info?)

Further, I have to agree with the question regarding textboxes in frames.

AND, if you are creating the textboxes (in the frame) dynamically - at run-
time - then you are indeed stuck. For you are correct, the MouseDown is not
there. You could possibkly write it in anyway, and make sure the name is the
nameof the in-the-future textbox.

I also have to say that unless there is areal serious reason for it, I rarely
create controls at run-time. It is much much easier to make controls
visible/invisble as required. I do often dynamically resize things, but
things that are already there.

Being already there, but say, resized tiny and invisible, all events for that
control are accessible.

fumei wrote:
>That is, only one mouse click is required. You click into the textbox, the
>name is written to the label. One click.
>
>>How can I detect the name of any textbox whith a mouse click in that textbox,
>>e.g. with the MouseDown Event?
>[quoted text clipped - 19 lines]
>>>Tanks in advance,
>>>Hans

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200806/1
Back to top
Login to vote
Helmut Weber

External


Since: Jun 18, 2005
Posts: 41



(Msg. 10) Posted: Mon Jun 30, 2008 9:01 pm
Post subject: Re: Detecting or reading the name of a textbox [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Fumei,

>By using the MouseDown for that textbox. I am not sure why the others are
>using the userform MouseDown.

because the code in userform mousedown
would be required only once, just for the form,
otherwise you would need the code for a textbox mousedown
for each textbox.

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
Back to top
Login to vote
Sunouchi

External


Since: Jun 26, 2008
Posts: 5



(Msg. 11) Posted: Tue Jul 01, 2008 1:25 am
Post subject: Re: Detecting or reading the name of a textbox [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 30 Jun 2008 18:55:32 GMT, "fumei via OfficeKB.com"
<u37563@uwe> wrote:

I solved the problem with reading the name and the contents of the
Dynamically created textboxes

fr_Velden is the frame
The names of the textboxes are: 'TextBox' and a number
col_CatalUnicode is a Collection

It works fine. That is what I need: the text in the TextBoxes

For Each ctl_Control In .fr_Velden.Controls
str_ControlName = ctl_Control.Name
str_ControlIdent = Left(str_ControlName, 7)
If str_ControlIdent = "TextBox" Then col_CatalUnicode.Add
Item:=ctl_Control.Text
Next

Thanks for your attention
Hans

>Further, I have to agree with the question regarding textboxes in frames.
>
>AND, if you are creating the textboxes (in the frame) dynamically - at run-
>time - then you are indeed stuck. For you are correct, the MouseDown is not
>there. You could possibkly write it in anyway, and make sure the name is the
>nameof the in-the-future textbox.
>
>I also have to say that unless there is areal serious reason for it, I rarely
>create controls at run-time. It is much much easier to make controls
>visible/invisble as required. I do often dynamically resize things, but
>things that are already there.
>
>Being already there, but say, resized tiny and invisible, all events for that
>control are accessible.
>
>fumei wrote:
>>That is, only one mouse click is required. You click into the textbox, the
>>name is written to the label. One click.
>>
>>>How can I detect the name of any textbox whith a mouse click in that textbox,
>>>e.g. with the MouseDown Event?
>>[quoted text clipped - 19 lines]
>>>>Tanks in advance,
>>>>Hans
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> User Forms All times are: Eastern Time (US & Canada) (change)
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET