No video

Creating a userform in MS Word and using it to insert information into a bookmark

  Рет қаралды 179,857

LearningEngineer.com

LearningEngineer.com

Күн бұрын

In this video, I explain how I created a document that utilizes a userform in MS Word using the Developer tab and Visual Basic.

Пікірлер: 100
@Tahehe
@Tahehe 3 жыл бұрын
Thank you so much for this. I have created several template documents I use all the time with your help. It has saved me hours of manually inputting names and dates that I would always miss before.
@fekrabusinesssolutions
@fekrabusinesssolutions 10 ай бұрын
2023. And ur video rocks! Thanks a lot!
@ScottPantall
@ScottPantall 9 жыл бұрын
Thank you for this video! Your example led me to FormFields which I'm using in my Word 2013 document instead of Bookmarks. I never would have arrived at this solution without your video.
@nickdenton210
@nickdenton210 7 жыл бұрын
Hi, in your first line of code what is "lname"? If is the Bookmark name what is "fname" doing in the next line? I am very confused. I thought the Bookmark name was the one in brackets? And what is the Me in the Me.TextBox1?
@onihonker
@onihonker 9 жыл бұрын
Thank you for teaching me how to do this. We use Word to print labels for our moulding samples and typing out a different stain color each time we need a new label is tedious.
@IanWitts
@IanWitts 11 жыл бұрын
Great tutorial, thank you. I'm actually stuck on how to use one of the values a user has entered multiple times within a document i.e. enter a name once and use that name multiple times. If you have any thoughts on that it would be much appreciated.
@LearningEngineercom
@LearningEngineercom 3 жыл бұрын
You hit the nail on the head. You can't use one variable multiple times. You have to create a new variable for every one of the places you want to go. This seems inefficient, but it's just Microsoft.
@1234567mrbob
@1234567mrbob 2 жыл бұрын
It doesn't work for me. When I create a form (UserForm1) and call it from autonew (Userform1.Show). I get the error "424" Object not found.
@rachaelbackdoor4872
@rachaelbackdoor4872 3 жыл бұрын
It would be nice if this tutorial began by informing the viewer you must have significant knowledge and experience with these specific operations to understand what is happening.
@LearningEngineercom
@LearningEngineercom 3 жыл бұрын
I see your point, but the video is only six minutes. The description of the video does tell the view that Visual Basic will be used.
@LearningEngineercom
@LearningEngineercom 5 жыл бұрын
You have to go into Visual Basic under the developer tab. The name of the form should be in the list on the left.
@IanWitts
@IanWitts 11 жыл бұрын
Thank you for the swift response! In Word 2013 it *appears* to take the formatting of the initial bookmark and copy it to all cross-referenced areas. That said, it's probably just me being stupid!
@lisamykytik4902
@lisamykytik4902 7 жыл бұрын
Is there a way to have a UserForm created with a Submit button, that when clicked will enter the entire contents of the UserForm into my Word Document? (including not just textboxes, but also radio buttons, checkboxes & labels)
@LearningEngineercom
@LearningEngineercom 7 жыл бұрын
Yes
@daltonhubbard7843
@daltonhubbard7843 3 жыл бұрын
Before I go too far down the rabbit hole is there a way to set a bookmark within a one of these? If not, there may be a better way to do what I want to do. I want to include a certain section only in certain circumstances, but that section also contains text that I'd like to autofill. I.e. if my report requires the inclusion of a common element and that common element contains a variable such as a report outlining say the use of a plot of land, I say farm, it autofills a wall of text about farms, and then I also want to say specifically cattle versus horses or sheep within that wall of text.
@coopercreativemedia6720
@coopercreativemedia6720 3 жыл бұрын
Super helpful... Can't thank you enough brother
@bomberbrown8790
@bomberbrown8790 9 жыл бұрын
For multiple entries of the same data, I tried copying the Bookmark to an additional location but this just removes the original bookmark. Do I need to change the Range in someway?
@JK-hm3lf
@JK-hm3lf 4 жыл бұрын
I am using Word 2010. I have created macro enabled template to fill students form using info by you in this video. Now I wanted: 1: to use saveAs command such that the fileName becomes value in textbox1. 2: to make the document ready for the next student, after saving the first one. Please guide how can I do these?
@icysaracen3054
@icysaracen3054 2 жыл бұрын
Can you help me with my assignment. This is what I have to do: •An application is needed to customise the footer of report documents with the user’s department name: He would like you to incorporate the use of a VBA form. The user must be offered a choice of departments (including an option for the Director), with the selected Department being added to the footer without destroying the text already in the template’s footer.
@Ramp10er
@Ramp10er 8 жыл бұрын
Thanks for these tutorial. I love VB but making codes gives me a hard time. I like exploring... How to clear the document if I want another data to be formatted? Let's just add a clear button if client made a mistake or for you instead makes editing...
@Tom-iv9zv
@Tom-iv9zv 5 жыл бұрын
Could I use the 'userform1.show" in a macro button to make the form pop up at the click of a button?
@kaushalchauhan4209
@kaushalchauhan4209 3 жыл бұрын
How can i clear the bookmarks without deleting them if i want to add information for a second time ?
@BradScript
@BradScript 2 жыл бұрын
How, then, do I then get data I set up in a text box to repeat elsewhere in the same template {REF textboxname} does not work, including in the header? Further, how can I populate this data across multiple templates? I've been banging my head for the entire workweek searching and trying out solutions. I'm trying to create a user form that will populate data 1) across multiple templates, 2) populate some of the data the user entered into a header/footer, and 3) populate the user=entered data in such a way that it repeats in the same template. I've followed your instructions on this video to create the form thus far (everything works except repeating a data field or applying that data into a header and second template).
@LearningEngineercom
@LearningEngineercom 2 жыл бұрын
Ok. You have several issues going on here. First, for each bookmark in the document that you want to insert data into, you have to have its own variable and has to be loaded separately from the form item. If this seems dumb, it is. Second, it is unlikely that it will load into multiple templates, but I could be wrong. I would send the data to a text file on the computer that the other templates read from. See this video. kzbin.info/www/bejne/lYHSh5Wgos9_l7s
@kylempd
@kylempd 9 жыл бұрын
Cant get my bookmarks to work I can type in but add button stays grey. Ive open and saved as macro WB. Im lost this is harder than excel!
@wazzym290
@wazzym290 3 жыл бұрын
Does anyone know where to get my submit box to get those scripts? Do i type them manually?
@LearningEngineercom
@LearningEngineercom 3 жыл бұрын
This document should work learningengineer.com/cloud/docs/Automated%20APA%20Form%20Document.docm
@stephaniepravaz9660
@stephaniepravaz9660 9 жыл бұрын
Thank you so much Le. But my userform isnt working. I keep getting error 424, What did I do?
@autumnrita1234
@autumnrita1234 5 жыл бұрын
Can you repeat a bookmark for 2 different locations in your document but yielding the same value from inserted information?
@LearningEngineercom
@LearningEngineercom 5 жыл бұрын
Yes and no. Yes, you can repeat information from once source; however, the bookmarks have to have their own unique names.
@lagusgoudas2705
@lagusgoudas2705 2 жыл бұрын
hello how to feed a listbox on UserForm word vba 'Thank you for everything'
@I3lackDragon
@I3lackDragon 7 жыл бұрын
How can I create more than 1 indicator? For example for Name I want to have 2 outputs. Name: Ryan So "Ryan" was doing this and the "Ryan"... Thanks a lot.
@LearningEngineercom
@LearningEngineercom 7 жыл бұрын
Create another bookmark and in the code send the input to it as well.
@I3lackDragon
@I3lackDragon 7 жыл бұрын
It worked! Thanks a lot! As you explained to me: Dim Nome2 As Range Set Nome2 = ActiveDocument.Bookmarks("Nome2").Range Nome2.Text = Me.TextBox1.Value
@alejandroatencio08
@alejandroatencio08 8 жыл бұрын
wow! You are the best! Thank for the video!
@vt8victory
@vt8victory 6 жыл бұрын
Is there anyway that I can make 01 userform and use it for 3-4 document files?
@jannatfatima6642
@jannatfatima6642 5 жыл бұрын
Bookmarks disappear after successfully running the userform the first time. How to fix this?
@MissM689
@MissM689 9 жыл бұрын
Thanks! How do you create the "submit" button?
@educationhub8241
@educationhub8241 5 жыл бұрын
How to open ms word in form1 or child form or richtextbox or panel box whatever and save vb btn automatic in specific drive
@bargains3487
@bargains3487 4 жыл бұрын
Thansks for your great tutorial! This used to work for me, now it won't open as macros have been disabled or something? I'm in Spain and of course word here is in Spanish so can't figure out what to do? Any advice? :)
@LearningEngineercom
@LearningEngineercom 4 жыл бұрын
You have to enable macros in your security settings in Word or when you save the file.
@bargains3487
@bargains3487 4 жыл бұрын
@@LearningEngineercom Thanks! Yes, I have been trying to figure this out in Spanish haha! It's really difficult to find the correct settings in English so I can try and figure it out in Spanish for Window 7/Word 10? I'll keep looking for a good tutorial. Thanks for your time! :)
@Ramp10er
@Ramp10er 8 жыл бұрын
How to clear the text you have input in the textbox ? I can't figure out the code...
@LearningEngineercom
@LearningEngineercom 8 жыл бұрын
+Ramp10er Create a button and in the button's code like at 4:44, lName.Text = "" fName.Text = "" cName.Text = "" iName.Text = "" hlName.Text = "" Me.Repaint
@Ramp10er
@Ramp10er 8 жыл бұрын
+LearningEngineer.com Code not working... But the code on your video does work...
@LearningEngineercom
@LearningEngineercom 8 жыл бұрын
+Ramp10er Sorry, that clears the text boxes. Use ALL the same code from 4:44 except for replacing all the Me.TextBox2.Value with an empty quotes like the previous code I provided.
@MultiMilton25
@MultiMilton25 10 жыл бұрын
how can i round an answer like ,153 to 0,153??? I was looking on the web for an answer but cant find any:( (word vba)
@nkt20880
@nkt20880 6 жыл бұрын
Thank you for making this video
@hounamao7140
@hounamao7140 5 жыл бұрын
how can I reopen the userform once I've submitted it once, on the user side. To edit some of the forms for instance.
@LearningEngineercom
@LearningEngineercom 5 жыл бұрын
When it opens, don't let it run the macro.
@adrianruizgonzalez2028
@adrianruizgonzalez2028 8 жыл бұрын
Thank for your help bro I owe you one. Greetings
@nickdenton210
@nickdenton210 7 жыл бұрын
hi, how do you know what code to write in the Command Button form?
@jacobmarkarian
@jacobmarkarian 5 жыл бұрын
How do I go back to the userform to make some edits? I'm lost
@Nofanization
@Nofanization 6 жыл бұрын
Hi Can you make a tutorial how to input a text from visual basic, based on formula on visual basic?
@crudecod
@crudecod 5 жыл бұрын
thank you for the video. Are you also an airline pilot ?
@aminamuhsen409
@aminamuhsen409 4 жыл бұрын
Type the names of the 5 windows you use that represent Userform? please answer 🥺
@tuaparulian4975
@tuaparulian4975 8 жыл бұрын
Hi learning engineer, What should we do to make the userform dialog box appear at 0:30? Do we have to save the doc that we create in macro enabled or in template? I'd appreciate your reply. I"m a real novice. Thanks man.
@LearningEngineercom
@LearningEngineercom 8 жыл бұрын
+Tua Parulian Yes, you have to change your security settings to get it to come up and save it as a template. At 5:23 it shows you the code.
@tuaparulian4975
@tuaparulian4975 8 жыл бұрын
+LearningEngineer.com Thanks for your reply, but I still don't know where we can change the security setting. Can you tell me?
@LearningEngineercom
@LearningEngineercom 8 жыл бұрын
+Tua Parulian It should be under the Developer tab or in the Trust Center which is under Options.
@tuaparulian4975
@tuaparulian4975 8 жыл бұрын
Fantastic, I'll try that. Thanks a lot, LearningEngineer.
@tuaparulian4975
@tuaparulian4975 8 жыл бұрын
Hi LE, I tried as per your comment but I didn't see the security thing you mentioned in the trust certificate. It looks like your video is for people who are already familiar with the basics. Would you do a step by step video on how to make that dialog box appear so we can simply type in and the info will show in the doc just like what we see? I'd be thankful. I want to make a template so my colleagues can simply use it and type in the info without having to copy and paste table which is really annoying. I just want to help simplify my friends work on preparing report on student's progress, and mine, that's all. If you could help on that, I'd be thankful.
@linden1763
@linden1763 10 жыл бұрын
Hi, I'd like to first say thanks for the great video, was very helpful. Do you know how to do the following: 1. I have the dialogue open each time the document is opened but if I fill in the dialogue box the second time it doesnt delete the original text, instead it adds the new text to the old text, can I make it delete the old text if new text is entered? 2. How can I reference this bookmark text elsewhere in the document? If I try inserting a field for "Ref" and select the bookmark it comes out blank, same goes for using cross reference
@linden1763
@linden1763 10 жыл бұрын
Or is there a way to use this form tutorial to change the "custom document properties"
@LearningEngineercom
@LearningEngineercom 10 жыл бұрын
If you copy the bookmark and put it elsewhere using the same reference name, it should put in the same information as the first input.
@linden1763
@linden1763 10 жыл бұрын
LearningEngineer.com Do you know if it is possible to use the UserForm to edit/update "Custom Document Properties"
@linden1763
@linden1763 10 жыл бұрын
LearningEngineer.com I worked it out, thanks for the quick response. If anyone else wants to create a UserForm to edit "Custom Document Properties" follow the KZbin video above but for the Private Sub Code use the following code and copy the ".Custom" line for as many properties as you require: Private Sub CommandButton1_Click() With ActiveDocument .CustomDocumentProperties("Project Number").Value = Me.TextBox1.Value UserForm1.Hide .Fields.Update End With End Sub
@nickc1759
@nickc1759 9 жыл бұрын
LearningEngineer.com Linden Bromwich How exactly do you copy the bookmark?
@flynnbonser6214
@flynnbonser6214 10 жыл бұрын
Great video but im having this error where i click my submit button but it says Compile error : Invalid use of property and i click ok on it and it brings me up to the properties of the submit button and highlights the words Private Sub CommandButton1_Click() -Please Respond if you can
@jopedder
@jopedder 7 жыл бұрын
I found this a little difficult to follow, having to rewind and rewatch multiple times - it looks like the guy is using keyboard shotcuts to selct items on the screen without saying so, as he says things like this will create x, but the cursor is in the wrong place and you can only tell that something has changed by noticing a tiny icon looks a little different! Got there in the end though!
@LearningEngineercom
@LearningEngineercom 7 жыл бұрын
I have a new video that I created on this topic at kzbin.info/www/bejne/nWatZaeGobNgqa8
@theolaross2569
@theolaross2569 10 жыл бұрын
I want to preserve my form from edits but allow the user to insert text and print it and save as a copy. If I password protect it I get the following error message, "Run-time error '6124': You are not allowed to edit this selection because it is protected.". What is the best way to do this? Should I have it open as a copy?
@LearningEngineercom
@LearningEngineercom 10 жыл бұрын
Yes, you can open it as a copy, or you have to change the security settings.
@theolaross2569
@theolaross2569 10 жыл бұрын
LearningEngineer.com How would I do so without allowing the user to change the original document. How would I, for example, have the user open and fill out the form and not give them save as copy and/or print it? The original would stay as is. Thank you
@theolaross2569
@theolaross2569 10 жыл бұрын
Theola Ross I should have said ..not allow them to save to the original form. They would save as copy and/or print it? Thanks again.
@LearningEngineercom
@LearningEngineercom 10 жыл бұрын
Theola Ross You simply need to save your original document as a template, which won't let them save it as the original.
@theolaross2569
@theolaross2569 10 жыл бұрын
LearningEngineer.com I saved it as .dotm, changed the security warning "Macros have been disabled", and resave it. I went into the Trust Center and selected "Trute access to the VBA project object model". Idon't get the form fields after saving.
@chauchanhsaly
@chauchanhsaly 6 жыл бұрын
Could you create user and password on file word ???
@LearningEngineercom
@LearningEngineercom 6 жыл бұрын
I don't see why not. You would want something like this: kzbin.info/www/bejne/lYHSh5Wgos9_l7s&lc=
@adiltheprodigy8235
@adiltheprodigy8235 7 жыл бұрын
Good video but how to erase the last data when you put a new data
@LearningEngineercom
@LearningEngineercom 7 жыл бұрын
You would need to clear the bookmark. Instead of attaching the variable like lName.Text to a text box just clear it with a null value, such as lName.Text = ''. Then repaint the document.
@adiltheprodigy8235
@adiltheprodigy8235 7 жыл бұрын
LearningEngineer.com OK i will try thank you
@veasnalim1ify
@veasnalim1ify 6 жыл бұрын
LearningEngineer.com
@crispy2102
@crispy2102 7 жыл бұрын
Maybe I am missing something but what kind of object is "Me"?
@T4ish0
@T4ish0 7 жыл бұрын
The code is NOT within worksheet or module, it is contained in UserForm1 object, so in any procedure used within this object, instead of UserForm1, you can use "Me".
@rebeccaadams1566
@rebeccaadams1566 5 жыл бұрын
Not easy to follow at all - jumps all over the place - not good for a beginner
@LearningEngineercom
@LearningEngineercom 5 жыл бұрын
I also have another video that covers the same information which you might find easier to understand: kzbin.info/www/bejne/qZ23dat_jNuBepI
@roscmon
@roscmon 10 ай бұрын
Yeah, this was completely confusing.
Pt 3: Using a form, bookmarks, and VBA in MS Word to fill a document.
46:02
LearningEngineer.com
Рет қаралды 16 М.
GTA 5 vs GTA San Andreas Doctors🥼🚑
00:57
Xzit Thamer
Рет қаралды 25 МЛН
小丑和白天使的比试。#天使 #小丑 #超人不会飞
00:51
超人不会飞
Рет қаралды 33 МЛН
1ОШБ Да Вінчі навчання
00:14
AIRSOFT BALAN
Рет қаралды 4,9 МЛН
Blue Food VS Red Food Emoji Mukbang
00:33
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 33 МЛН
Curso de VBA: Option Button en Formularios Excel VBA (Botón Opción)
12:31
Using a Form in MS Word to Populate a Document
11:12
LearningEngineer.com
Рет қаралды 24 М.
MS Word: Inserting information into a bookmark using multiple forms.
11:41
LearningEngineer.com
Рет қаралды 13 М.
Microsoft Word: Create a Form with a Submit Button
13:11
Learners Cloud
Рет қаралды 140 М.
Create a MS Word Data Entry Form (Source File Included)
24:36
How to Work With Documents in Word VBA
17:50
Sigma Coding
Рет қаралды 38 М.
#WORDVBA   WORD VBA - Insert tables
11:35
Computeraidedautomation.com
Рет қаралды 3,2 М.
VBA - UserForm - Erstellen, Aufrufen, Auslesen
11:19
Jens K. Perret
Рет қаралды 22 М.
PowerPoint 2021 Links, Bookmarks and Actions
8:56
Tech Time with Tricia
Рет қаралды 558
GTA 5 vs GTA San Andreas Doctors🥼🚑
00:57
Xzit Thamer
Рет қаралды 25 МЛН