Results 1 to 3 of 3

Thread: Textbox Total of Other Textboxes on a Form [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    New Member PineyWoodsJimbo's Avatar
    Join Date
    Feb 2004
    Location
    Where the buffalo roam, USA
    Posts
    3

    Thumbs up Textbox Total of Other Textboxes on a Form [RESOLVED]

    Please tell me if I am on the right track.

    I have a userform with many textboxes, but let's just say there are three. I want the third textbox to always show a running total of the amounts in the other boxes on the form. I have tried some of the suggestions in other threads without success. Also, if if is easier to create an array of control objects (textboxes), how do I do that?

    Here is what I have so far:

    Private Sub AddAll_Click()
    Dim BoxArray As Integer
    Dim TotalSum As Double
    TotalSum = 0
    For BoxArray = 1 To 2
    TotalSum = TotalSum + Val(Values(BoxArray).Text)
    Next BoxArray
    UserForm1.TextBox3.Value = TotalSum
    End Sub


    Thanks,
    Jimbo.
    Last edited by PineyWoodsJimbo; Apr 2nd, 2004 at 01:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width