+ Reply to Thread
Results 1 to 6 of 6

Code has stopped adding data to list, I can't see why

  1. #1
    Registered User
    Join Date
    01-29-2020
    Location
    South Africa
    MS-Off Ver
    2019
    Posts
    4

    Code has stopped adding data to list, I can't see why

    Hi folks

    New to VBA and this forum, please be forgiving if I make any faux pas (and for my lack of VBA knowledge).

    I have a workbook where the workflow is; add a new sheet, insert data into that sheet and then click a CommandButton (Start here) to draw that new sheet's name into a combobox1 where it can be selected. Combobox 2 is simply a choice of department. Then the next CommandButton (log session) activates that new sheet (that which was chosed in Combobox1, does text-to-column on it, and pastes certain of these columns into an Analysis sheet. I also need to register the combobox results into a list on a Session List sheet.
    This was all working fine until yesterday. I made the session list a table, as I have a formula in the first column that I wanted to autofill when new data is added to the next row. I thought it was the fact that I had changed it to a table, as opposed to a range as specified in my code, but now that I have converted the table back to range it still doesn't work and I'm at my wit's end trying to find out why. Any help would be appreciated.

    Side note: It tells me opening and repairing when I open the file due to it freezing yesterday... could it be that the file is corrupt and thus code isn't working? I have not attached the file, as I now can't even open it and will have to redo it (luckily have a copy of the code in text file so I can use this as a basis)
    I am trying to avoid setting objects etc as i understand zero of that dim stuff.
    I have set sheet names with Code Names (ie InputsCN) to avoid errors if the user changes the sheet names

    Please Login or Register  to view this content.
    Last edited by SalRP; 04-09-2020 at 10:04 AM.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,234

    Re: Code has stopped adding data to list

    Hi SalRP
    Welcome to our Forum...

    Please take a moment to read our forum rules...here
    Your post does not comply with Rule # 2
    2. Programming code must be enclosed in code tags to improve readability. (A, Z)
    Please Login or Register  to view this content.
    So...Edit your post...Highlight the code and press the # button

    Also...See yellow banner above...this will assist in the ability to provide the correct solution...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    01-29-2020
    Location
    South Africa
    MS-Off Ver
    2019
    Posts
    4

    Re: Code has stopped adding data to list, I can't see why

    Thank you kindly Sintek. I have made changes re CODE, but have not attached the document as it is not working at all now. I will be starting to redo it now

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,234

    Re: Code has stopped adding data to list, I can't see why

    have not attached the document as it is not working at all now
    So...attach and explain what you are wanting to achieve...

  5. #5
    Registered User
    Join Date
    01-29-2020
    Location
    South Africa
    MS-Off Ver
    2019
    Posts
    4

    Re: Code has stopped adding data to list, I can't see why

    Hi Sintek

    When I said earlier doesn't work at all I meant I couldn't even open the excel document at all (excel not working at all, not the VBA). I have since recovered the code, recreated the document and new version is now working. It must have been that the document was corrupt after all, although I still have no idea on why that happened in the first place. Thank you for your inputs and I will better understand the rules for future posts (I have some further queries but they are unrelated to this title so I will create a new query for assistance).

    Thanks again, have a good long weekend

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,234

    Re: Code has stopped adding data to list, I can't see why

    Glad you got it sorted...Come back soon...Tx for unexpected rep +

+ 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] no changes but VBA code stopped working
    By Sway2119 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2017, 09:09 PM
  2. My VBA code stopped working please help.
    By Dark0Prince in forum Excel General
    Replies: 5
    Last Post: 02-02-2017, 07:15 PM
  3. [SOLVED] Excel has stopped adding numbers when extending a formula to adjacent cells
    By PistachioPedro in forum Excel General
    Replies: 9
    Last Post: 11-16-2013, 09:31 PM
  4. VB code stopped working involving data import using XML
    By hariimmadi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2011, 06:04 PM
  5. Code stopped working
    By chris46521 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2006, 10:05 AM
  6. My formula cell has stopped adding the preceding cells.
    By Miriam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-02-2006, 10:40 AM
  7. [SOLVED] Adding a validation list by code
    By Philippe Pons in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2005, 12:05 PM

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