+ Reply to Thread
Results 1 to 2 of 2

UserFrom Checkbox Selection not populating Cells

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-12-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    201

    UserFrom Checkbox Selection not populating Cells

    I'm sure I'm doing this wrong, since its not working for me.....

    I've created a user form with a bunch of check boxes that can be selected.
    I created the command button on the sheet to bring up the user form when pushed.

    That works.^

    But when I select the boxes I want results from, nothing happens? None of the cells are populating with results from the selected boxes.

    Any suggestions would be appreciated.

    Command Button Code:
    Sub Button29_Click()
    VesselDetails1.Show
    End Sub
    UserForm Code:
    Private Sub showvesseldetails_Click()
    'VESSEL INFORMATION
                'Vessel Operations Options
                If VesselDetails1.loadbox.Value = True Then
                    Worksheets("Cover Page").Range("A18").Value = "Load"
                End If
                If VesselDetails1.dischargebox.Value = True Then
                    Worksheets("Cover Page").Range("A18").Value = "Discharge"
                End If
                If VesselDetails1.conditionbox.Value = True Then
                    Worksheets("Cover Page").Range("A18").Value = "Condition & Load / Blend"
                End If
    'Vessel Gauging Options
    If VesselDetails1.innagebox.Value = True Then
        Worksheets("Cover Page").Range("A21").Value = "Innage"
    End If
    If VesselDetails1.ullagebox.Value = True Then
        Worksheets("Cover Page").Range("A21").Value = "Ullage"
    End If
                'Calculations Options
                If VesselDetails1.vacuumbox.Value = True Then
                    Worksheets("Cover Page").Range("A24").Value = "Vacuum"
                End If
                If VesselDetails1.vacuumairbox.Value = True Then
                    Worksheets("Cover Page").Range("A24").Value = "Vacuum / Air"
                End If
    'Blending Options
    If VesselDetails1.yesgpabox.Value = True Then
        Worksheets("Cover Page").Range("A27").Value = "Yes-GPA/HP"
    End If
    If VesselDetails1.yeshpbox.Value = True Then
        Worksheets("Cover Page").Range("A27").Value = "Yes-HP/GPA"
    End If
    If VesselDetails1.yesbox.Value = True Then
        Worksheets("Cover Page").Range("A27").Value = "Yes"
    End If
    If VesselDetails1.nobox.Value = True Then
        Worksheets("Cover Page").Range("A27").Value = "No"
    End If
                'Conditioning in BOL Options
                If VesselDetails1.yesbolbox.Value = True Then
                    Worksheets("Cover Page").Range("A30").Value = "Yes"
                End If
                If VesselDetails1.nobolbox.Value = True Then
                    Worksheets("Cover Page").Range("A30").Value = "No"
                End If
    
    'SHORE MEASUREMENT
    'Shore Measurement Options
    If VesselDetails1.activebox.Value = True Then
        Worksheets("Cover Page").Range("L17").Value = "Active"
    End If
    If VesselDetails1.shoretankbox.Value = True Then
        Worksheets("Cover Page").Range("L17").Value = "Shore Tank"
    End If
    If VesselDetails1.shoremetersbox.Value = True Then
        Worksheets("Cover Page").Range("L17").Value = "Shore Meters"
    End If
                'Shore Quantified Options
                If VesselDetails1.barrelsbox.Value = True Then
                    Worksheets("Cover Page").Range("L20").Value = "Barrels"
                End If
                If VesselDetails1.gallonsbox.Value = True Then
                    Worksheets("Cover Page").Range("L20").Value = "Gallons"
                End If
                If VesselDetails1.poundsbox.Value = True Then
                    Worksheets("Cover Page").Range("L20").Value = "Pounds"
                End If
                If VesselDetails1.cubicmetersbox.Value = True Then
                    Worksheets("Cover Page").Range("L20").Value = "Cubic Meters"
                End If
    'Vessel Liquid Options
    If VesselDetails1.t54box.Value = True Then
        Worksheets("Cover Page").Range("I29").Value = "T54 - New"
    End If
    If VesselDetails1.astmtable54box.Value = True Then
        Worksheets("Cover Page").Range("I29").Value = "ASTM Table 54"
    End If
    If VesselDetails1.depauwstokoeethylenebox.Value = True Then
        Worksheets("Cover Page").Range("I29").Value = "Depauw & Stokoe (Ethylene)"
    End If
    If VesselDetails1.depauwstokoepropylenebox.Value = True Then
        Worksheets("Cover Page").Range("I29").Value = "Depauw & Stokoe (Propylene)"
    End If
                'Shore Liquid Options
                If VesselDetails1.t24newbox.Value = True Then
                    Worksheets("Cover Page").Range("M29").Value = "T24 - New"
                End If
                If VesselDetails1.d1550table2box.Value = True Then
                    Worksheets("Cover Page").Range("M29").Value = "ASTM D - 1550 Table 2"
                End If
                If VesselDetails1.lc736table3box.Value = True Then
                    Worksheets("Cover Page").Range("M29").Value = "LC - 736 Table 3"
                End If
                If VesselDetails1.astmtable24box.Value = True Then
                    Worksheets("Cover Page").Range("M29").Value = "ASTM Table 24"
                End If
                If VesselDetails1.chevproplyenebox.Value = True Then
                    Worksheets("Cover Page").Range("M29").Value = "Chevron Propylene"
                End If
                If VesselDetails1.depauwstokoepropylenebox2.Value = True Then
                    Worksheets("Cover Page").Range("M29").Value = "Depauw & Stokoe (Propylene)"
                End If
    'Shore Vapor Options
    If VesselDetails1.d1550table1box.Value = True Then
        Worksheets("Cover Page").Range("H31").Value = "ASTM D - 1550 Table 1"
    End If
    If VesselDetails1.d1550table4box.Value = True Then
        Worksheets("Cover Page").Range("H31").Value = "ASTM D - 1550 Table 4"
    End If
    If VesselDetails1.butene1box.Value = True Then
        Worksheets("Cover Page").Range("H31").Value = "Butene 1 (TPC)"
    End If
    If VesselDetails1.petrotexbox.Value = True Then
        Worksheets("Cover Page").Range("H31").Value = "Petro-Tex"
    End If
    If VesselDetails1.chevronpropylenebox.Value = True Then
        Worksheets("Cover Page").Range("H31").Value = "Chevron Propylene"
    End If
    If VesselDetails1.compfactorbox.Value = True Then
        Worksheets("Cover Page").Range("H31").Value = "Comp. Factor or Molecular Wt"
    End If
    End Sub
    
    Private Sub CommandButton1_Click()
    VesselDetails1.Hide
    End Sub

  2. #2
    Forum Contributor
    Join Date
    07-12-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: UserFrom Checkbox Selection not populating Cells

    I solved this one myself. I changed all Checkboxes to Option Buttons.

    Thanks anyway.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Populating Cells Based on Single Cell Selection
    By dantmaldo in forum Excel General
    Replies: 6
    Last Post: 05-09-2014, 12:15 PM
  2. Help Pre-Populating userfrom into unknown textbox
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-01-2012, 03:34 AM
  3. Populating a Range of Cells from a ListBox Selection
    By cmaitlen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2012, 07:06 PM
  4. populating data from another sheet using a checkbox.
    By Darkflame808 in forum Excel General
    Replies: 0
    Last Post: 10-31-2011, 02:22 AM
  5. Auto populating cells depending on selection of records
    By hnnn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-03-2010, 04:35 AM

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