Results 1 to 13 of 13

Problems adding items to listbox

Threaded View

mrapes Problems adding items to... 06-07-2012, 02:41 PM
jraj1106 Re: Problems adding items to... 06-08-2012, 02:44 AM
thameem127 Re: Problems adding items to... 06-08-2012, 07:06 AM
royUK Re: Problems adding items to... 06-08-2012, 07:52 AM
mrapes Re: Problems adding items to... 06-08-2012, 08:53 AM
royUK Re: Problems adding items to... 06-08-2012, 07:44 AM
jraj1106 Re: Problems adding items to... 06-08-2012, 09:02 AM
mrapes Re: Problems adding items to... 06-08-2012, 09:07 AM
royUK Re: Problems adding items to... 06-08-2012, 09:56 AM
mrapes Re: Problems adding items to... 06-08-2012, 10:10 AM
mrapes Re: Problems adding items to... 06-08-2012, 10:54 AM
royUK Re: Problems adding items to... 06-08-2012, 12:50 PM
mrapes Re: Problems adding items to... 06-08-2012, 12:55 PM
  1. #1
    Registered User
    Join Date
    06-07-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2003
    Posts
    20

    Problems adding items to listbox

    I am VERY new VBA programmer so I need some help. Below is my code. I cannot seem to get the items to add to my listbox. Below is what I found as code online as examples, but it doesn't seem to work. There are probably other problems as well, so if anyone has any suggestions, please, fire away!



    Private Sub UserForm_initialize()
    
    nameto.Clear
    nameby.Clear
    asset.Clear
    insttype.Clear
    dateerror.Clear
    doctype.Clear
    comments.Clear
    
    With errorlistbox
        .AddItem "Footnotes"
        .AddItem "Writeover"
        .AddItem "Missing Signature"
        .AddItem "Incorrect/No Date"
        .AddItem "Blanks on Page"
        
    End With
    
    End Sub
    
    
    Private Sub submit_Click()
    
        ActiveWorkbook.Sheets("Sheet2").Activate
        Range("A2").Select
    
        Do
        If IsEmpty(ActiveCell) = False Then
            ActiveCell.Offset(1, 0).Select
        End If
    
        Loop Until IsEmpty(ActiveCell) = True
        ActiveCell.Value = nameto.Value
        ActiveCell.Offset(0, 1) = nameby.Value
        ActiveCell.Offset(0, 2) = asset.Value
        ActiveCell.Offset(0, 3) = insttype.Value
        ActiveCell.Offset(0, 4) = dateerror.Value
        ActiveCell.Offset(0, 5) = doctype.Value
        
        ActiveCell.Offset(0, 6) = errorlistbox.Value
        
        Range("A2").Select
        
        DoCmd.Close acForm, "UserForm"
    
    End Sub

    It also may help to know that I am getting 'Runtime Error 424 Object Required' when I run the code.
    Last edited by mrapes; 06-08-2012 at 10:56 AM. Reason: more info needed

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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