Link to home
Start Free TrialLog in
Avatar of Bright01
Bright01Flag for United States of America

asked on

Add Attendee Macro need not halt for Acknowledgement

Ryan and Regonzo helped me with a great little attendance Macro.  One issue, when you add a name the code stops for you to acknowledge the new record added.  YOU MUST CLICK OK.  Then it asks if you would like to add another record.  YOU MUST CLICK YES/NO.

Here's the simple ask.  I want the acknowledgement of the record, but I simply want it to show the acknowledgement, pause for 1 second, and then ask if you would like to add another record.  It may seem small, but when you are adding a lot of records, it saves time.

Thank you in advance,

B.
Adding-Records-to-a-Table-Macro.xlsm
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

message boxes don't work like that. You would need to add some timer code Is it worth it? It seems totally unnecessary to me.

What was wrong with the input form that I provided, it handled the input much more cleanly?
Remove lines 3, 5, 8, 9 and 10.
    MsgBox "One Record Registered Successfully"
    
    Response = MsgBox("Do You Want To Enter Another Record?", vbYesNo)
    
    If Response = vbYes Then
        Call UserForm_Initialize
        CompanyComboBox.SetFocus
    Else
        Unload Me
    End If

Open in new window

And to add a one-secod wait, just add this line.

Application.Wait (Now + #12:00:01 AM#)

Open in new window

Avatar of Bright01

ASKER

Greetings Martin.  I tried to install your code and couldn't get it to work.  It still comes up asking for you to confirm that it registered a new name.... instead of acknowledging it and then asking "Add a new record?"

Can you test it once on your end?

Thank you,

B.
Roy, I think I'm using the box you provided.  Did you look at the example I attached?  There seems to be a box within a box that asks the two questions;  1.) Confirm the add.  ("OK") and 2.) Do you want to add another record? (Yes/No).  One work around is to simply remove the Confirm.  That seems like a waste of time....... my first choice however, was to simply have it acknowledge the add and then ask the question about another record.

B.
Are you sure you removed line 3? If you did then all you should see is the "One Record Registered Successfully" message.
Hi,

Please find attached...I have cleaned up many thing which was initially made by me.

Please let me know what other changes you need.
Adding-Records-to-a-Table-Macro_v1.xlsm
If you want both the messages in one box then change below line:
Response = MsgBox("Do You Want To Enter Another Record?", vbYesNo)
to
Response = MsgBox("One Record Registered Successfully, Do You Want To Enter Another Record?", vbYesNo)

Please find attached for your reference....
Adding-Records-to-a-Table-Macro_v2.xlsm
Shums, thanks for the reply.  Unfortunately it's a step backwards for where I already am.  

Martin, your code works but instead of it asking do you want to add a record? It again acknowledges the useless response of "A Record has successfully been added.  

How about this?  Let's simply make it so we can add a record and when it is added, there is no acknowledgement or "ask" if you want to add another one.... let's simply clear the fields so as to assume another record will be added.  Then there is the option of exiting if you don't want to add another record.  That may be as simple as we can get.

Thanks again,

B.
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Martin, thanks for the help on this.  Appreciate the second effort here.  Works well.

B.
You're welcome and I'm glad I was able to help.

If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.

Marty - Microsoft MVP 2009 to 2016
              Experts Exchange MVE 2015
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2016