Results 1 to 6 of 6

Help With Excel Form Outputting Weird Values

Threaded View

  1. #1
    Registered User
    Join Date
    08-06-2011
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question Help With Excel Form Outputting Weird Values

    Hello all. Nice forum.

    I have been having some trouble with this form in an Excel sheet I created to keep track of my eBay transactions. Every time I input data into this form [code is below] it works up until PayPal International Sales (variable is txtPaypalIntern.Value). It puts all the data into its correct cell as its typed in. When it gets to the cell where the data I typed into the form for PaypalIntern is supposed to go, it always inputs 40,614. Every cell after that in the row contains the data in the wrong place. The CLEAR and CLOSE buttons in the form also don't work. I can't remember if I downloaded this code to make the form or created it myself as it was a year or so ago. Can someone look at the code below for the form and tell me what is going wrong?

    Another question I have that I can't figure out is how to put into the form a way to calculate consignment splits. What I was thinking is putting a checkbox value into the form so I can check if it is a consignment item or not. IF the consignment checkbox is checked then to calculate "selling price X percentage" to figure my portion. How can I incorporate that into my form? Thank you for any help.

    Private Sub cmdAddItem_Click()
    
    ActiveWorkbook.Sheets("Jan").Activate
    
        Range("A4").Select
    
        Do
    
        If IsEmpty(ActiveCell) = False Then
    
            ActiveCell.Offset(1, 0).Select
    
        End If
    
        Loop Until IsEmpty(ActiveCell) = True
    
        ActiveCell.Value = txtDate.Value
    
        ActiveCell.Offset(0, 1) = txtItemNumber.Value
    
        ActiveCell.Offset(0, 2) = txtItem.Value
        
            If chkRelisted = True Then
    
                ActiveCell.Offset(0, 3).Value = "X"
    
            Else
    
                ActiveCell.Offset(0, 3).Value = ""
    
            End If
        
        ActiveCell.Offset(0, 4) = txtInsertFee.Value
        
        ActiveCell.Offset(0, 5) = txtAmountPaidItem.Value
        
        ActiveCell.Offset(0, 6) = txtSoldAmount.Value
        
        ActiveCell.Offset(0, 7) = txtActualShipping.Value
        
        ActiveCell.Offset(0, 8) = txtShippingPaid.Value
            
        ActiveCell.Offset(0, 9) = txtInsurance.Value
        
            If chkStoreSale = True Then
    
                ActiveCell.Offset(0, 11).Value = "X"
    
            Else
    
                ActiveCell.Offset(0, 11).Value = ""
    
            End If
        
        ActiveCell.Offset(0, 12) = txtEbayFVF.Value
        
        ActiveCell.Offset(0, 13) = txtPaypalUS.Value
        
        ActiveCell.Offset(0, 14) = txtPaypalIntern.Value
        
        ActiveCell.Offset(0, 15) = txtDatePaid.Value
        
        ActiveCell.Offset(0, 16) = txtDateShipped.Value
        
                If chkFeedbackLeft = True Then
    
                    ActiveCell.Offset(0, 17).Value = "X"
    
                Else
    
                    ActiveCell.Offset(0, 17).Value = ""
    
                End If
                
                If chkTransCompl = True Then
    
                    ActiveCell.Offset(0, 18).Value = "X"
    
                Else
    
                    ActiveCell.Offset(0, 18).Value = ""
    
                End If
        
        ActiveCell.Offset(0, 19) = txtAdjustments.Value
        
        ActiveCell.Offset(0, 21) = txtBuyerName.Value
        
        ActiveCell.Offset(0, 22) = txtBuyerAddress.Value
        
        Range("A4").Select
    
    
    End Sub
    
    Private Sub Label1_Click()
    
    End Sub
    
    Private Sub ToggleButton1_Click()
    
    End Sub
    
    Private Sub txtebayfvf_Change()
    
    End Sub
    
    Private Sub txtPaypalUS_Change()
    
    End Sub
    
    Private Sub UserForm_Initialize()
    
        txtDate.Value = ""
    
        txtItemNumber.Value = ""
        
        txtItem.Value = ""
        
        chkRelisted = False
        
        txtInsertFee.Value = ""
        
        txtAmountPaidItem.Value = ""
        
        txtSoldAmount.Value = ""
        
        txtActualShipping.Value = ""
        
        txtShippingPaid.Value = ""
        
        txtInsurance.Value = ""
        
        chkStoreSale = False
        
        txtEbayFVF.Value = ""
        
        txtPaypalUS.Value = ""
        
        txtPaypalIntern.Value = ""
        
        txtDatePaid.Value = ""
        
        txtDateShipped.Value = ""
        
        chkFeedbackLeft = False
        
        chkTransCompl = False
        
        txtAdjustments.Value = ""
        
        txtBuyerName.Value = ""
        
        txtBuyerAddress.Value = ""
    
            txtDate.SetFocus
    
    End Sub
    
    
    Private Sub cmdClose_Click()
    'This Unloads the Add Item form and makes the address spreadsheet the active window.
    
    Unload Me
    
    Worksheets("Jan").Activate
    
    
    End Sub
    
    Private Sub cmdClear_Click()
    
    Call UserForm_Initialize
    
    End Sub
    -Regards
    TeachPower
    Last edited by arthurbr; 08-07-2011 at 11:59 AM. Reason: Removed add

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