How do I put these into a submit button on the form. I have created the button I just need to know how to make it do the functions below.
![]()
Please Login or Register to view this content.
How do I put these into a submit button on the form. I have created the button I just need to know how to make it do the functions below.
![]()
Please Login or Register to view this content.
Hello briant97,
Assuming all the code you post resides in a VBA module in your project, add the calls to the click event for the submit button. It would help top know what type of button you are using: Forms or Control Toolbox.
For Example
![]()
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
I went to insert and to form control. When I click submit I get Cannot run the macro "SSR.xls!Submit'. The Macro may not be available in this workbook or all macros my be disabled.
Below is the code that I have.
![]()
Please Login or Register to view this content.
To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.
If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
Doing this will ensure you get the result you need!
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
I have attached a dummy workbook.
Hello briant97,
Here is the macro for the "Submit" button. Add a VBA module to your workbook project. Copy and paste this code into it. Follow the directions below on how to attach the macro to the button.
Add the Macro to the Command Button![]()
Please Login or Register to view this content.
1. Right Click the Button.
2. Click View Code... from the menu.
3. A new window will open titled Assign Macro.
4.Click the entry SaveAndSend in the list.
5. Click OK.
6. Use CTRL+S to save the changes.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks