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

Поділитися
Вставка
  • Опубліковано 23 гру 2024

КОМЕНТАРІ • 100

  • @Tahehe
    @Tahehe 3 роки тому +1

    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 Рік тому

    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 років тому +1

    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?

  • @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?

  • @lisamykytik4902
    @lisamykytik4902 7 років тому +1

    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)

  • @coopercreativemedia6720
    @coopercreativemedia6720 3 роки тому

    Super helpful... Can't thank you enough brother

  • @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.

  • @IanWitts
    @IanWitts 11 років тому +4

    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  4 роки тому

      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.

  • @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.

  • @bomberbrown8790
    @bomberbrown8790 10 років тому

    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?

  • @MissM689
    @MissM689 10 років тому

    Thanks! How do you create the "submit" button?

  • @kaushalchauhan4209
    @kaushalchauhan4209 4 роки тому

    How can i clear the bookmarks without deleting them if i want to add information for a second time ?

  • @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

  • @vt8victory
    @vt8victory 7 років тому

    Is there anyway that I can make 01 userform and use it for 3-4 document files?

  • @1234567mrbob
    @1234567mrbob 3 роки тому

    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.

  • @onihonker
    @onihonker 10 років тому

    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.

  • @nickdenton210
    @nickdenton210 8 років тому

    hi, how do you know what code to write in the Command Button form?

  • @Ramp10er
    @Ramp10er 8 років тому +1

    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 років тому +1

      +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.

  • @stephaniepravaz9660
    @stephaniepravaz9660 10 років тому

    Thank you so much Le. But my userform isnt working. I keep getting error 424, What did I do?

  • @jacobmarkarian
    @jacobmarkarian 5 років тому

    How do I go back to the userform to make some edits? I'm lost

  • @BradScript
    @BradScript 3 роки тому

    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  3 роки тому

      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.
      ua-cam.com/video/_PoVbjmjLaY/v-deo.html

  • @autumnrita1234
    @autumnrita1234 6 років тому

    Can you repeat a bookmark for 2 different locations in your document but yielding the same value from inserted information?

    • @LearningEngineercom
      @LearningEngineercom  6 років тому

      Yes and no. Yes, you can repeat information from once source; however, the bookmarks have to have their own unique names.

  • @bargains3487
    @bargains3487 5 років тому

    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  5 років тому +1

      You have to enable macros in your security settings in Word or when you save the file.

    • @bargains3487
      @bargains3487 5 років тому

      @@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! :)

  • @alejandroatencio08
    @alejandroatencio08 9 років тому

    wow! You are the best! Thank for the video!

  • @icysaracen3054
    @icysaracen3054 3 роки тому

    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.

  • @kylempd
    @kylempd 10 років тому

    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!

  • @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.

  • @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?

  • @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)

  • @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

  • @jannatfatima6642
    @jannatfatima6642 5 років тому

    Bookmarks disappear after successfully running the userform the first time. How to fix this?

  • @RyanSeiyu
    @RyanSeiyu 7 років тому +2

    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 років тому +2

      Create another bookmark and in the code send the input to it as well.

    • @RyanSeiyu
      @RyanSeiyu 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

  • @rachaelbackdoor4872
    @rachaelbackdoor4872 4 роки тому

    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  4 роки тому +1

      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!

  • @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 років тому +1

      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 UA-cam 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 10 років тому

      LearningEngineer.com Linden Bromwich How exactly do you copy the bookmark?

  • @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...

  • @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.

  • @nkt20880
    @nkt20880 6 років тому

    Thank you for making this video

  • @aminamuhsen409
    @aminamuhsen409 4 роки тому

    Type the names of the 5 windows you use that represent Userform?
    please answer 🥺

  • @Nofanization
    @Nofanization 6 років тому

    Hi
    Can you make a tutorial how to input a text from visual basic, based on formula on visual basic?

  • @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: ua-cam.com/video/_PoVbjmjLaY/v-deo.html&lc=

  • @adrianruizgonzalez2028
    @adrianruizgonzalez2028 9 років тому

    Thank for your help bro I owe you one.
    Greetings

  • @lagusgoudas2705
    @lagusgoudas2705 2 роки тому

    hello how to feed a listbox on UserForm word vba 'Thank you for everything'

  • @crudecod
    @crudecod 5 років тому

    thank you for the video. Are you also an airline pilot ?

  • @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 7 років тому

      LearningEngineer.com

  • @flynnbonser6214
    @flynnbonser6214 11 років тому +2

    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

  • @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".

  • @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 ua-cam.com/video/g5J4tPlN-sM/v-deo.html

  • @rebeccaadams1566
    @rebeccaadams1566 6 років тому +1

    Not easy to follow at all - jumps all over the place - not good for a beginner

    • @LearningEngineercom
      @LearningEngineercom  6 років тому

      I also have another video that covers the same information which you might find easier to understand: ua-cam.com/video/slTDxIWvND0/v-deo.html

  • @roscmon
    @roscmon Рік тому

    Yeah, this was completely confusing.