Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-02-2023, 11:41 PM
Guessed's Avatar
Guessed Guessed is offline Number of Tables based Off Quantity Selected in Drop Down List Windows 10 Number of Tables based Off Quantity Selected in Drop Down List Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Select one instance of the table along with a paragraph above and below that table and then go to the Developer Tab and click on the Repeating Section Content Control button.



You can then use the plus button on the bottom right to add more sections. You can right click to add or remove sections. You can also add a macro to ask for a count and do them all at once.
Code:
Sub RepeatMe()
  Dim aCC As ContentControl, iCount As Integer
  Set aCC = ActiveDocument.SelectContentControlsByTitle("Repeater")(1)
  iCount = InputBox("How many?", , 5)
  With aCC.RepeatingSectionItems
    If iCount > .Count Then
      Do While .Count < iCount
        .Item(.Count).InsertItemAfter
      Loop
    ElseIf .Count > iCount Then
      Do While .Count > iCount
        .Item(.Count).Delete
      Loop
    End If
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #2  
Old 12-03-2023, 05:59 AM
Krhamm Krhamm is offline Number of Tables based Off Quantity Selected in Drop Down List Windows 11 Number of Tables based Off Quantity Selected in Drop Down List Office 2021
Novice
Number of Tables based Off Quantity Selected in Drop Down List
 
Join Date: Dec 2023
Posts: 11
Krhamm is on a distinguished road
Default

Thank you for the reply. I apologize though, I am a newbie. I am currently using legacy forms, will using content controls muddy up my form and possibly cause issues when users try to fill out this form? This form will be distributed to my team and they will use this when they need it.

Edit: I just realized that I left out a piece of information that may change your answer. I want to lock this fillable form so that the user cannot modify anything other than the fields and dropdowns I have provided. So they would need to be able add tables either by clicking the quantity of tables in a dropdown or if they could have access to a button such as + or add, that would work too.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a drop down list that if (a) is selected then (x) happens mummarochy Word 1 06-11-2018 10:07 PM
Show/ hide three sections of a cover page based on the option selected in the drop down list raizadamili Word 3 04-18-2018 06:56 AM
Drop down box list based on response to another drop down box Phideaux Excel 16 04-13-2018 03:07 AM
numbered list: bold when selected and fade when selected following number village PowerPoint 0 11-08-2017 10:43 AM
Need macro to fill data from different sheets based on selected item from drop down skorasika Excel Programming 1 03-13-2015 11:25 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:09 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