PDA

View Full Version : Solved: UF Copy Textbox Value



Emoncada
05-27-2010, 06:51 AM
I have 2 Textboxes. (TxtIP1) & (TxtGW1).

What I want to try to do is the following.
User will enter an IP address in (TxtIP1) after Textbox is updated with IP address I want (TxtGW1) to copy TxtIP1.value and just change value after 3rd Period to a "1"

Example

TxtIP1.value = 192.168.0.38

Should be
TxtGW1.value = 192.168.0.1

Any help would be great.

Thanks

Bob Phillips
05-27-2010, 07:06 AM
Private Sub TxtIP1_AfterUpdate()
With Me.TxtIP1

Me.TxtGW1.Text = Left$(.Text, InStrRev(.Text, ".")) & "1"
End With
End Sub

Emoncada
05-27-2010, 07:23 AM
That worked Perfectly XLD.

Thanks