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

VBA Textbox

 
Goto page Previous  1, 2
   Home -> Office -> General Discussions RSS
Next:  convert from producer to mp3  
Author Message
Alexf

External


Since: May 20, 2008
Posts: 38



(Msg. 9) Posted: Fri Jul 04, 2008 1:51 pm
Post subject: Re: VBA Textbox [Login to view extended thread Info.]
Archived from groups: microsoft>public>powerpoint (more info?)

Thanks!

But one question, What does "Strip Out" mean?

So, how would you write

If Right$(Me.TextBox1.Text, 1) = "=" Then

in code?
Back to top
Login to vote
Steve Rindsberg

External


Since: Apr 02, 2004
Posts: 11480



(Msg. 10) Posted: Sat Jul 05, 2008 12:17 pm
Post subject: Re: VBA Textbox [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <D824F820-A44E-4A9A-9BD2-B9C68D7FA7B5.TakeThisOut@microsoft.com>, Alexf wrote:
> Thanks!
>
> But one question, What does "Strip Out" mean?

Remove. We're forcing the user to type = to end the input into the box but you
don't want to ask PPT to go to slide 12=. It'll barf. So we remove (strip)
the trailing = sign from the text.

But don't worry about it, that bit's just a comment. VBA ignores anything that
starts with a '

> So, how would you write
>
> If Right$(Me.TextBox1.Text, 1) = "=" Then
>
> in code?

Um. That IS the code.



-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Back to top
Login to vote
Alexf

External


Since: May 20, 2008
Posts: 38



(Msg. 11) Posted: Sat Jul 05, 2008 12:17 pm
Post subject: Re: VBA Textbox [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ok, Thanks!

"Steve Rindsberg" wrote:

> In article <D824F820-A44E-4A9A-9BD2-B9C68D7FA7B5.DeleteThis@microsoft.com>, Alexf wrote:
> > Thanks!
> >
> > But one question, What does "Strip Out" mean?
>
> Remove. We're forcing the user to type = to end the input into the box but you
> don't want to ask PPT to go to slide 12=. It'll barf. So we remove (strip)
> the trailing = sign from the text.
>
> But don't worry about it, that bit's just a comment. VBA ignores anything that
> starts with a '
>
> > So, how would you write
> >
> > If Right$(Me.TextBox1.Text, 1) = "=" Then
> >
> > in code?
>
> Um. That IS the code.
>
>
>
> -----------------------------------------
> Steve Rindsberg, PPT MVP
> PPT FAQ: www.pptfaq.com
> PPTools: www.pptools.com
> ================================================
>
>
>
Back to top
Login to vote
Alexf

External


Since: May 20, 2008
Posts: 38



(Msg. 12) Posted: Sun Jul 06, 2008 7:40 pm
Post subject: Re: VBA Textbox [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ok, but how do you get the slide to advance

(say you type in "LEGAL", then what do you do? press enter?)
Back to top
Login to vote
David M. Marcovitz

External


Since: Mar 23, 2004
Posts: 2552



(Msg. 13) Posted: Mon Jul 07, 2008 8:14 am
Post subject: Re: VBA Textbox [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

=?Utf-8?B?QWxleGY=?= <Alexf.TakeThisOut@discussions.microsoft.com> wrote in
news:95172A9E-1842-40A4-B96D-A038B1F10653@microsoft.com:

> ok, but how do you get the slide to advance
>
> (say you type in "LEGAL", then what do you do? press enter?)

Actually, you don't need to hit Enter. It should advance automatically.
The TextBox1_Change procedure gets activated every time the text box
changes. So, if some types in L, it runs the procedure, doesn't match
any of the choices, and does nothing. Then someone types E, it runs the
procedure and does nothing. Once someone types the =, it checks to see
if the word preceding it is marketing or legal and goes automatically to
the correct slide. If the text before = doesn't match anything, Steve's
code says to pop up a message that says "Sorry, ..."

By the way, there is no need to type in ALL-CAPS as the testing is case-
insensitive in Steve's code.

Also, thanks Steve for picking this up as I was away for a few days.

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Back to top
Login to vote
Steve Rindsberg

External


Since: Apr 02, 2004
Posts: 11480



(Msg. 14) Posted: Mon Jul 07, 2008 11:05 am
Post subject: Re: VBA Textbox [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <95172A9E-1842-40A4-B96D-A038B1F10653.TakeThisOut@microsoft.com>, Alexf wrote:
> ok, but how do you get the slide to advance
>
> (say you type in "LEGAL", then what do you do? press enter?)

Type an "=" character (or change the code so it's something else).



-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Back to top
Login to vote
Steve Rindsberg

External


Since: Apr 02, 2004
Posts: 11480



(Msg. 15) Posted: Mon Jul 07, 2008 3:51 pm
Post subject: Re: VBA Textbox [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <Xns9AD4724E19846marcoNOSPAMloyolaedu.RemoveThis@207.46.248.16>, David M.
Marcovitz wrote:
> =?Utf-8?B?QWxleGY=?= <Alexf.RemoveThis@discussions.microsoft.com> wrote in
> news:95172A9E-1842-40A4-B96D-A038B1F10653@microsoft.com:
>
> > ok, but how do you get the slide to advance
> >
> > (say you type in "LEGAL", then what do you do? press enter?)
>
> Actually, you don't need to hit Enter. It should advance automatically.
> The TextBox1_Change procedure gets activated every time the text box
> changes. So, if some types in L, it runs the procedure, doesn't match
> any of the choices, and does nothing.

And thanks back to you for noticing that. That alone makes it a better buy to
type in names rather than numbers. Nice catch, David.


Then someone types E, it runs the
> procedure and does nothing. Once someone types the =, it checks to see
> if the word preceding it is marketing or legal and goes automatically to
> the correct slide. If the text before = doesn't match anything, Steve's
> code says to pop up a message that says "Sorry, ..."
>
> By the way, there is no need to type in ALL-CAPS as the testing is case-
> insensitive in Steve's code.
>
> Also, thanks Steve for picking this up as I was away for a few days.
>
> --David
>

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> General Discussions 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