+ Reply to Thread
Results 1 to 10 of 10

Inputing into Cell creates Command button (or alternative) on userform

  1. #1
    Registered User
    Join Date
    01-15-2016
    Location
    Place
    MS-Off Ver
    2016
    Posts
    4

    Inputing into Cell creates Command button (or alternative) on userform

    Hi everyone, hopefully I'm following forum rules correctly but if not the please move topic/let me know and I'll make sure I follow them properly!

    To the problem!

    I am attempting to create a database of participant information that can be accessed by the team at the charity I work for, I am no-where near creating the whole database at this point but am trying to create the parts to use within it. I'm also using these tasks to help me learn VB in the hope that when I come to put all the parts together to create the database I will have a vague idea of what I am doing.

    Anywho, thus far I have used information and tutorials from the web to create a button on a worksheet which takes the user to a userform which asks for participant information (first, surname, address, etc).

    Once this data is entered into the userform it is sent to the registration worksheet while the firstname and surname are also sent to the signin sheet. Now here comes my problem.

    I would like another userform (signin) that when opened will have the names that have been entered into the signin available as commandbuttons or similar, that when clicked on will turn Green to show that they have been signed in. When the user form is saved-(data sent to worksheet) I would like the date the userform was saved to show up along the top of the worksheet and a mark under it to show who was present on that day along with a total.

    Now that I write that out it sounds like a lot. My Current test Workbook is attached and I have attached a screen shot of the userform interface idea for the signin sheet.

    Any help is much appreciated or any directions to tutorials etc that cover that sort of things would also be great (cells creating buttons doesn't seem to come up often)

    Thanks for looking!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Inputing into Cell creates Command button (or alternative) on userform

    Hi moop77

    Welcome to the Forum!!!

    What is the Max Number of participants...your Sign In Form shows 9.
    Last edited by jaslake; 01-18-2016 at 06:05 PM.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Inputing into Cell creates Command button (or alternative) on userform

    Hi moop77

    Try the Code in the attached...it appears to do as you ask...not certain it does as you require...
    Attached Files Attached Files

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Inputing into Cell creates Command button (or alternative) on userform

    Instead of creating command buttons, why don't you have your user form read the sheet, fill in a two column list box and put a star next to the signed in users.


    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Registered User
    Join Date
    01-15-2016
    Location
    Place
    MS-Off Ver
    2016
    Posts
    4

    Re: Inputing into Cell creates Command button (or alternative) on userform

    Hi jaslake and mikerickson thank you for getting back to me!

    jaslake - That looks like it would do what I'm looking for but I don't have a set number of participants. The chances are no group will be more than 25 but is there a way to make it extend as new ones are added? Also I'm getting run-time error 91 when I try and run it I've attached a screen shot, I've peered at it for a while but yeah I'm no where near being able to debug anything.

    mikerickson - I can't get the code you put up to do anything although I imagine that's because I'm putting it in the wrong places.

    To give you a bit more background, the idea is that different people who run the different groups within the charity will use their own sign-in sheet for their group and they'll do so using a tablet.
    So for example lets say there is 3 groups.
    When group 1 is in for their activity the leader would switch the tablet on and press/click on the "Group 1" worksheet button on the tablets desktop. This would open a worksheet that has a 'signin' button and a 'add to register' button for group 1 (the register itself and other info will be set to hidden).
    They will then click on the signin userform button.
    As participants come in they will click on their name showing they are in and if any new members turn up they can click on the register button get the details of off the participant and enter them into the register. Then the signin sheet will update with the new participant on it.

    So at the moment I'm thinking each group would have their own set of worksheets but then all of the data would also go to 2 over all worksheets, 1 with all of the registered users that go to all activities and 1 which has participation numbers.

    So basically I thought having the names come up as command buttons would be the best way to keep it simple for the people who will be using the user interface. Does that make sense?
    I'm definitely open to other ideas though if anyone has a better way of doing this? and I would definitely try different things too.

    Thanks again you two it is very much appreciated. Attachment 441350

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

    Re: Inputing into Cell creates Command button (or alternative) on userform

    moop77

    There's a problem with your attachment, could you try attaching it again?

    By the way, I agree with mikerickson - a listbox is a better idea than multiple command buttons.
    If posting code please use code tags, see here.

  7. #7
    Registered User
    Join Date
    01-15-2016
    Location
    Place
    MS-Off Ver
    2016
    Posts
    4

    Re: Inputing into Cell creates Command button (or alternative) on userform

    Thanks Norie, I'd be happy with a list box, if people think that's the best way to go. Where would I place the code mikerickson put up? Hopefully it attaches ok this time runtime error.jpg

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

    Re: Inputing into Cell creates Command button (or alternative) on userform

    The code to populate the listbox would go in the userform's Initialize event.

    The code in the image you posted appears to be for populating a sheet based on which command buttons were selected.

    If you were to use a listbox the code for that would be quite different, and a lot more straightforward.

    Any chance you could upload a sample workbook?

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

  9. #9
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Inputing into Cell creates Command button (or alternative) on userform

    After some though, rather than a two column list box, I think a MultiSelect list box would be closer to what you want.

  10. #10
    Registered User
    Join Date
    01-15-2016
    Location
    Place
    MS-Off Ver
    2016
    Posts
    4

    Re: Inputing into Cell creates Command button (or alternative) on userform

    Thanks Norie, I've attached the testworkbook I'm using just now which has the registration part working ok.

    Hi Mike, It looks like that would work too.

    Just to add a little more info again, each group who will be using a sign-in sheet may also have an extra unique sign-in item. For instance we have 1 group who pay £1 so on their sign-in I'm planning on having their name and then if they have paid or not, then a total of people attendance and money paid in.

    Group 2 on the other hand don't pay but do come to the group with a parent/guardian, so in this case we want to know who is here (normal sign-in) but also who they are here with (parent - Male/female, grandparent - male/female or other - male/female) So in this case we have participation numbers but are also able to get numbers of who is attending with them and their gender (which will then help us report back to the team and funders with info like "95% of guardians coming to sessions are female so we need to see if we can get more males involved".

    While doing all of this I also want to keep it as simple as possible for the people who will be entering this data (as it will not be me and they'll be doing it on a tablet) but it will be me who is then analysing/passing on info later on.

    I said at the start I'm trying to piece it together bit by bit to try and learn how it works before I put all of these elements together, I realise that may be the longest and most likely way to get errors, but thought it might be the best way to learn a reasonable amount about creating such projects and also I'm not then asking someone to do it for me although I realise the way it's going so far that's basically what I'm doing!

    Thanks again!
    Attached Files Attached Files
    Last edited by moop77; 01-19-2016 at 11:29 AM. Reason: Mike's reply (more info)

+ 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] Userform command button not responding
    By bqheng in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-16-2015, 04:43 AM
  2. [SOLVED] Run Command Prompt Icacls code in VBA Command Button on Userform
    By luismalave in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2015, 11:40 PM
  3. [SOLVED] UserForm Frame Command Button
    By nicksyplonk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2015, 11:28 AM
  4. Alternative to SumIf which creates a dynamic list
    By Enigmafish14 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-08-2013, 05:06 PM
  5. Hiding a Command Button in a UserForm
    By dvoit91 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-29-2011, 11:28 PM
  6. UserForm Command button
    By aCmE in forum Word Programming / VBA / Macros
    Replies: 7
    Last Post: 01-10-2011, 11:53 AM
  7. Userform Command Button to open new userform
    By JamesT1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2010, 12:02 PM

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