In that case you will need to as many copy of codes


+++++
*I did not do this for you. God is here working through me for you.*

On Thu, Sep 25, 2014 at 11:29 AM, Mr_Bill <egge...@gmail.com> wrote:

>
> It requires a bit more than that. I change TextBox1 to wtBox1 now what
> about wtBox2,wtBox3,wtBox4,wtBox5 as I said there are 15 not just one.
> Suppose too much work for a freebie thank you anyways.
> On Wednesday, September 24, 2014 10:31:21 PM UTC-7, Vabz wrote:
>>
>> hi
>>
>> You need to change TextBox1 to text box you desired.
>>
>> Cheers!!
>>
>> +++++
>> *I did not do this for you. God is here working through me for you.*
>>
>> On Wed, Sep 24, 2014 at 11:18 PM, Mr_Bill <egg...@gmail.com> wrote:
>>
>>> Can this code be adapted to work with only certain textboxs? I have 15
>>> boxes in a form that require a number to be input and all are named wtBox1
>>> - wtBox15
>>>
>>> Dim LastPosition As Long
>>>>
>>>> Private Sub TextBox1_Change()
>>>>   Static LastText As String
>>>>   Static SecondTime As Boolean
>>>>   If Not SecondTime Then
>>>>     With TextBox1
>>>>      ' Digits Only (no plus or minus)
>>>>      *'If .Text Like "*[!0-9]*" Then*
>>>>      ' Digits Only (plus or minus allowed)
>>>>      *'If .Text Like "*[!0-9+-]*" Or .Text Like "?*[+-]*" Then*
>>>>      ' Floating Point Numbers (no plus or minus)
>>>>      *'If .Text Like "*[!0-9.]*" Or .Text Like "*.*.*" Then*
>>>>      ' Floating Point Numbers (plus or minus allowed)
>>>>      *If .Text Like "*[!0-9.+-]*" Or .Text Like "?*[+-]*" Or .Text Like 
>>>> "*.*.*" Then*
>>>>         Beep
>>>>         SecondTime = True
>>>>         .Text = LastText
>>>>         .SelStart = LastPosition
>>>>       Else
>>>>         LastText = .Text
>>>>       End If
>>>>     End With
>>>>   End If
>>>>   SecondTime = False
>>>> End Sub
>>>>
>>>> Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As 
>>>> Integer, _
>>>>                                ByVal X As Single, ByVal Y As Single)
>>>>   With TextBox1
>>>>     LastPosition = .SelStart
>>>>     'Place any other MouseDown event code here
>>>>   End With
>>>> End Sub
>>>>
>>>> Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
>>>>   With TextBox1
>>>>     LastPosition = .SelStart
>>>>     'Place any other KeyPress checking code here
>>>>   End With
>>>> End Sub
>>>>
>>>>
>>>
>>> Thank you
>>>
>>> --
>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be?
>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
>>> https://www.facebook.com/discussexcel
>>>
>>> FORUM RULES
>>>
>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>>> will not get quick attention or may not be answered.
>>> 2) Don't post a question in the thread of another member.
>>> 3) Don't post questions regarding breaking or bypassing any security
>>> measure.
>>> 4) Acknowledge the responses you receive, good or bad.
>>> 5) Jobs posting is not allowed.
>>> 6) Sharing copyrighted material and their links is not allowed.
>>>
>>> NOTE : Don't ever post confidential data in a workbook. Forum owners and
>>> members are not responsible for any loss.
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "MS EXCEL AND VBA MACROS" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to excel-macros...@googlegroups.com.
>>> To post to this group, send email to excel-...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/excel-macros.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to