Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-21-2022, 04:30 AM
austria130 austria130 is offline Userform listbox reading from external excel Windows 11 Userform listbox reading from external excel Office 2019
Novice
Userform listbox reading from external excel
 
Join Date: Dec 2022
Posts: 8
austria130 is on a distinguished road
Default Userform listbox reading from external excel

Hi guys,



unfortunately i do not know how to code and never worked with VBA. I spent several hours of reading and watching documents/tutorials/videos about this but cant figure out how to get the results i wish for.

I tried to follow the tutorial here: Create & Employ a Userform

I also clicked through and found exactly a guide on populating from external excel worksheet but still failed...

What i want:

I have a word template saved as .dotm which has several parts and is filled from many different people.
In one part i want a dropdown field where people can choose multiple selection (eg. item1 and item2 etc.). This multiselection should be printed into the spot in the document (i heared that it is easiest setting a bookmark to the spot i wish the output being printed to). The population of the listbox (dropdown) should be automatically retreived from an external excel with 1 column but many rows (n=100-300 entries).



What i managed so far:

Set a bookmark in the document i want my output at (bookmark name= bookmark1)
Created a userform with an "ok" and "cancel" button and a listbox

My Cancel command button
Code:
Private Sub cmdCancel_Click()
Me.Hide
End Sub

Module code to show the userform
Code:
Sub CallUF()
Dim oFrm As frmSurvey
  Set oFrm = New frmSurvey
  oFrm.Show
  Unload oFrm
  Set oFrm = Nothing
lbl_exit:
  Exit Sub
End Sub


And the rest was just trial and error by copying from multiple sources and nothing worked for me

Can anyone do a a step by step guide in plain language for non coders. Also i would like to understand the code for future adaptation

Thank you very much !
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform listbox reading from external excel Yet another Multi-Select Listbox in Userform question Javir Word VBA 4 09-24-2019 01:01 AM
Dynamic Userform multiselect listbox populate trevorc Excel Programming 1 12-03-2018 02:49 PM
How do I code ListBox and DatePicker in UserForm? - Word 2013 ickelly Word VBA 4 08-05-2015 04:07 PM
This is a Userform LIstbox queston: A variable does not set to the value of a listbox CatMan Excel Programming 14 08-18-2014 08:14 PM
Userform listbox reading from external excel This is a Userform LIstbox queston: A variable does not set to the value of a listbox CatMan Excel 1 08-08-2014 09:41 AM

Other Forums: Access Forums

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