Results 1 to 2 of 2

User Form Text Box running Function - How to format number?

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    667

    User Form Text Box running Function - How to format number?

    I have a user box running this code. Because the numbers it pulls in for TxtA - TxtD are the result of a formula, they show on the user form as having 8or 9 decimal how do I change it to Text=Format("0.00")

    Private Sub CboPart_Change()
    If CboPart = "" Then Exit Sub
    If Selection <> "" Then Exit Sub
    
    Me.TxtMkt = WorksheetFunction.VLookup(Me.CboPart, Sheets("Parts").Range(CboMainframe.Text), 4, False)
    Me.TxtPartNo = WorksheetFunction.VLookup(Me.CboPart, Sheets("Parts").Range(CboMainframe.Text), 5, False)
    Me.TxtList = WorksheetFunction.VLookup(Me.CboPart, Sheets("Parts").Range(CboMainframe.Text), 9, False)
    Me.TxtReq = WorksheetFunction.VLookup(Me.CboPart, Sheets("Parts").Range(CboMainframe.Text), 10, False)
    Me.TxtA = WorksheetFunction.VLookup(Me.CboPart, Sheets("Parts").Range(CboMainframe.Text), 15, False)
    Me.TxtB = WorksheetFunction.VLookup(Me.CboPart, Sheets("Parts").Range(CboMainframe.Text), 16, False)
    Me.TxtC = WorksheetFunction.VLookup(Me.CboPart, Sheets("Parts").Range(CboMainframe.Text), 17, False)
    Me.TxtD = WorksheetFunction.VLookup(Me.CboPart, Sheets("Parts").Range(CboMainframe.Text), 18, False)
    
    End Sub
    Thanks!
    Last edited by CRIMEDOG; 03-25-2011 at 12:15 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1