Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-17-2020, 05:49 PM
Kindyr Kindyr is offline Naming a variable using userform fields Windows 10 Naming a variable using userform fields Office 2019
Novice
Naming a variable using userform fields
 
Join Date: Aug 2020
Posts: 12
Kindyr is on a distinguished road
Default Naming a variable using userform fields

Hello, I am wanting to create a persistent variable in a Word document that is based off of a userform. Basically, a user will a form, fill it out and at a later point, information from that userform will be used to print something else. So we will say they have two boxes to fill out with simple information. Those boxes will be EVParty (PartyTypeList) and EVNum (EvidenceID). I want to name a variable with the input from those two boxes. Here is what I have so far:



Dim EVParty As String
EVParty = PartyTypeList.Value
Dim EVNum As String
EVNum = EvidenceID.Value
Dim EXHIB As String
EXHIB = EVParty & EVNum


Now, I want to name a variable with the value that is EXHIB. So let's say the had a party named ...Bob and a number of 3, EXHIB = Bob3, and our new variable would be named Bob3.

The reason I need Bob3 is because I want to put more information into a specific item that is the unique item of Bob3 which would include the page number of Bob3 and other bits of information that might be added at other points of the document. So I'm wanting this to be a persistent variable that is the value of EXHIB. (Sorry if I am over explaining.)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Show userForm from variable Cosmo Word VBA 5 01-31-2018 12:59 PM
Naming a variable using userform fields Assigning a string variable to a userform label caption Larry_1 Excel Programming 3 12-18-2017 06:59 AM
Project - variable data fields pmarc Word 7 04-04-2013 05:07 PM
30+ days Variable Day Date Calculations via Fields ztag Word 2 01-06-2012 11:12 AM
Variable fields? Emalee77 PowerPoint 0 01-30-2011 05:58 PM

Other Forums: Access Forums

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