Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #17  
Old 08-08-2022, 12:05 AM
shanshan89 shanshan89 is offline Code to add new row in table Windows 10 Code to add new row in table Office 2019
Novice
 
Join Date: Jul 2022
Posts: 17
shanshan89 is on a distinguished road
Smile

Dear macropod,

Thanks for the help. This works well for me!

As mentioned earlier, I have 3 tables which I have already bookmarked the tables of interest as Tbl1, Tbl2, Tbl3. Each of these tables have 3 columns and 1 row. At the last column/last row/last cell, instead of one content control, I have multiple content controls, where the last content control (bottom most) is named as "Resolve Date".

As such, when the user is prompted to add a new row, in the new row itself, the bookmark location will be shifted (it will not be in the exact spot “Resolve Date” as in the first row that I want it to be) and the user will be prompted to enter new row again at multiple content controls, not at the content control named as “Resolve Date”.

I have sought Mr Gregory's opinion on this and he has kindly advised me to modify my code to look for a specific tag/name upon ContentControl on Enter.

I tried to incorporate another conditional if statement as follows:
If CCtrl.Title = "Resolve Date" Then
If MsgBox("Add new row?", vbQuestion + vbYesNo) <> vbYes Then Exit Sub
End If

However this does not work. Are you able to advise how I should modify my code pls?

Thanks.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to add new row in table Colour code mail merge header table cell backgrounds ScotsMaverick Mail Merge 25 11-04-2021 02:07 PM
Code to add new row in table Code to disable spacing between cells in table properties bloomhaven Word VBA 3 03-11-2015 04:08 PM
Creating VBA Code to Delete Empty Column in Table Faugs Word VBA 5 08-07-2014 03:29 PM
Code to add new row in table VBA Code to take data from a table in word document and place it in a summary table VBLearner Word VBA 1 03-09-2014 08:42 PM
VBA sort table code mikec Excel Programming 8 10-01-2013 04:37 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft