+ Reply to Thread
Results 1 to 11 of 11

removeitem and listindex

  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    england
    MS-Off Ver
    Excel 2013
    Posts
    13

    removeitem and listindex

    I have this code but cannot get it to work?

    Me.axlenumbox.RemoveItem axlenumbox.ListIndex

    Can anyone assist with the placement.

    My code is:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: removeitem and listindex

    How doesn't it work?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-04-2013
    Location
    england
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: removeitem and listindex

    Well on the userform I select the combobox. In there is data previously entered into a spreadsheet. Once i select the data (one of the data) in this combo box and press submit i do not want that item to appear again in this combobox. As it it, when i select the combo box again the data reappears.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: removeitem and listindex

    Are you closing the form, opening it and that's when you find the value still there?

    Can you upload an example workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

  5. #5
    Registered User
    Join Date
    12-04-2013
    Location
    england
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: removeitem and listindex

    I have attached all files. In backpress stage 2 userform the combobox is called axlenumbox.

    It may need paths changing to work for you in the userforms etc. The database viewer is just a viewer to duplicate the database.

    each stage has an axle number that passes through it if it passed at the previous stage. Once selected and submitted at each stage i need it to show in the next stage but be removed from the stage it has just been submitted from.

    I also need the data to remain in the database.
    Attached Files Attached Files

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: removeitem and listindex

    Do you need multiple userforms?

    You could do the whole thing with one form with a multipage for each existing form.

  7. #7
    Registered User
    Join Date
    12-04-2013
    Location
    england
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: removeitem and listindex

    I have had that suggested but i think i need multiple userforms. The reason is that each userform is located on a different PC within a factory. Each one adds there own data and submits to the database. Certainly open to better suggestions, Im new to VBA but trying. Love it, but difficult.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: removeitem and listindex

    So the forms aren't linked?

  9. #9
    Registered User
    Join Date
    12-04-2013
    Location
    england
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: removeitem and listindex

    no. The only link is the database (but they are still not linked). Each form submits data to the database. Each form also imports their data from the database. (axle number etc) The forms, open the database, submit the data and then close the database. I need it like this because if the database remains open others cannot submit. The risk is that 2 people will submit at the same time which will clash i guess but it is unlikely to happen. the databse viewer is required because as a manager, he needs to view that all the time without effecting the running of the system.

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: removeitem and listindex

    What happens if 2 people are using 2 different forms at the same time and try and submit data to the database at the same time?

  11. #11
    Registered User
    Join Date
    12-04-2013
    Location
    england
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: removeitem and listindex

    then it will say the database is already open. (yes a problem). Fortunately the chances are slim but it can happen. It only opens for a split second.

+ 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. [SOLVED] RemoveItem failed?!
    By ExcelWizards in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2013, 05:55 PM
  2. RemoveItem from ComboBox
    By CrazyFileMaker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2009, 04:42 AM
  3. RemoveItem
    By wmorrison49 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-30-2008, 04:05 PM
  4. MSFlexGrid RemoveItem
    By gti_jobert in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2006, 06:30 AM
  5. RemoveItem - ComboBox
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2006, 11:55 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