Forum Discussion
Sending text
- Jun 25, 2022
Attached is a workbook. It has a data entry area like the first picture. The "Name" field has a dropdown from data validation that is tied to tblNames. When someone clicks "Post", whatever is in the Date and Name Fields is posted to tblLog.
The picture at bottom is the code. Used Alt-F11 to go from Excel to VBA and back again.
Hope this helps.
ooops! In the VBA window is Dim oLo as ListObject. That is totally unnecessary.
Excel's formulas cannot "Send" values to cells. Excel's VBA can. Do you want to use VBA?
Alternatively, you may want to consider Excel's automatic user form: https://www.easyexcelanswers.com/form.html
Thank you for replying.
- Yes I can use a vba.
- How would I do that.
- I wasn't sure if I could do some like if name cell and date cell then A1=B1 for instance
- Christopher1125Jun 25, 2022Copper Contributor
Thank you .
I will try it when I'm at work tomorrow.
Could I add a range 3 and title it
Ie comments and have a blank box where I can add the text and it will save that?
- Craig HatmakerJun 25, 2022Iron ContributorYou learn quickly 🙂 Absolutely. Add a Comments column to tblLog. Name the input cell "Comments". Then add to the VBA.
.Range(3) = [Comments]- Christopher1125Jun 25, 2022Copper Contributor
Thank you very much . It's a great help. I'll let you know how I get on
- Craig HatmakerJun 25, 2022Iron Contributor
Attached is a workbook. It has a data entry area like the first picture. The "Name" field has a dropdown from data validation that is tied to tblNames. When someone clicks "Post", whatever is in the Date and Name Fields is posted to tblLog.
The picture at bottom is the code. Used Alt-F11 to go from Excel to VBA and back again.
Hope this helps.
ooops! In the VBA window is Dim oLo as ListObject. That is totally unnecessary.
- Christopher1125Jun 26, 2022Copper ContributorHello mate just wanted to check before I start.
Do i add a button the assign your post click macro to it and with your ranges you have them on your work sheet horizontally in separate columns. Can I put them vertically( does it go by the name of the cell or by the column)
Thanks again- Craig HatmakerJun 26, 2022Iron ContributorThe inputs go by name so place them anywhere you like.
The log table can be placed anywhere as well, but it is a table so it will always go down the page.
The "Post" button is assigned to the macro. You can modify the macro and the button will still work. Place the button anywhere you like.
Hope that helps.