Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-19-2016, 09:13 PM
wlcdo2 wlcdo2 is offline Update Cell in a Table with Value from User Form Windows 7 32bit Update Cell in a Table with Value from User Form Office 2013
Novice
Update Cell in a Table with Value from User Form
 
Join Date: Jun 2016
Posts: 17
wlcdo2 is on a distinguished road
Default Update Cell in a Table with Value from User Form

I have a table within Word 2013 document. I want the user to select any cell within that table to be the 'recipient' of a value from a User Form. The user then opens the User Form that displays various choices by way of OptionButtons i.e. they may select from values such as A0, A3, A5, C5. Once they have made their choice, I have an "Update" button that transfers the value of the OptionButton to the cell in the table. I tried by inserting a Bookmark into the table, like so:



Code:
Private Sub btnUpdateP_Click()

Dim PeopleChoice As String, Tbl As Table, Rng As Range

If Me.optA0 Then
    PeopleChoice = "A0"
ElseIf Me.optA3 Then
    PeopleChoice = "A3"
ElseIf Me.optA5 Then
    PeopleChoice = "A5"
Else
    PeopleChoice = "C5"
End If
    Selection.Bookmarks.Add ("bmPeople")
    ActiveDocument.Bookmarks("bmPeople").Select
    Selection.Text = PeopleChoice
When I run through the code using the debugger, it works fine, but when I run the code for real (using an ActiveX button), the Bookmark is inserted at the location of the button that calls the UserForm, instead of the Table Cell.

Can anyone assist me with this one please?

Thank you.

Corin.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Cell in a Table with Value from User Form Allow Multiple Content Control same cell of form table DeborahBartlett Word 1 01-04-2014 11:06 AM
Update Cell in a Table with Value from User Form Trying to update a table cell with a value based on a drop down box entry mkasem Word VBA 2 09-29-2013 08:36 PM
Update Cell in a Table with Value from User Form Text Form Fields - Filling the table cell simville02 Word Tables 1 01-31-2013 11:12 PM
Update Cell in a Table with Value from User Form Update Outlook but user path changed Ossie1972 Outlook 1 12-08-2010 08:19 PM
Text Wrapping on Fixed Lines in a Form field/Table cell okrmjr Word Tables 0 10-30-2009 08:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:55 AM.


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