PDA

View Full Version : [SOLVED] Form selection



HV_L
05-19-2019, 06:27 AM
Hi,
I have a template, there are about 15 lines with a description. (for arguments sake, let's call them one, two, three etc.)
This template is used for different customers, which all need slightly different descriptions.

Can I make a list somewhere in the template excelworkbook with all possibilities, then for each report based on the template, select in a pop-up window which descriptions I want to use? (And leave the non-selected out of the active workbook)
If yes, how in the world does that look in VBA??
And, can those descriptions be set in the area where it's supposed to be? (I could name the range Costs from A55 - A75)
Again, how in the world.. ?

Thanks for your time and patience with me :-)

Rob342
05-19-2019, 10:45 AM
You could bring in the details for each customer via a user form and the select the fields you want to use
I am presuming you want a user form ?
if so you need to provide a detailed workbook on what you want to show

HV_L
05-19-2019, 11:26 AM
These are the values that vary per customer:

Representatiekosten
Telefoon/internet kosten
Administratiekosten
Kantoorartikelen
Autokosten
Brandstof
Klein werkmaterieel
Verzekeringen
Reclamekosten
Algemene kosten
Bankkosten
Personeelskosten
Overige personeelskosten
Huurkosten
Energiekosten

HV_L
05-20-2019, 05:50 AM
Created the form and made some comments on where I need help.. :-)
Hope there's still someone willing to help me out.
Thanks

Rob342
05-20-2019, 07:07 AM
HV_L
You are better with a Multi select list box you can then select as many as you want & its easier to add new stuff using a dynamic named range to hold the options
This does away with the need for all the check boxes and loops to see if they are true or false
If you bear with us i'll redo the form to show the listbox.
Rob

HV_L
05-20-2019, 07:15 AM
HV_L
You are better with a Multi select list box you can then select as many as you want & its easier to add new stuff using a dynamic named range to hold the options
This does away with the need for all the check boxes and loops to see if they are true or false
If you bear with us i'll redo the form to show the listbox.
Rob
Hi ROb,
Ok, please do as you think it's the best way..
Curious to see what comes up.. :-)

dotchiejack
05-21-2019, 03:23 AM
Does this work voor you?

HV_L
05-21-2019, 04:33 AM
Hi dotchiejack,
Yes! It does work, only one thing.. when I remove (manually) an item from the "Lijst"-sheet, the checkbox remains in the form visible.
A nicer way of removing an item from the Lijst would complete this. Thanks!

dotchiejack
05-21-2019, 05:54 AM
Hoi Hans,
Like this?

Cheers:beerchug:

Rob342
05-21-2019, 06:03 AM
HV_L

I have re-done the user form with the list box and added some checks for bad input
to select either use shift key & left mouse or for individual one use cntrl key & mouse
see what you think ok
Rob

HV_L
05-21-2019, 06:39 AM
Wow! Both are working just fine! Thank you dotchiejack and thank you Rob342!!
I'll let the user choose which version she want to use.
Gonna say it again: Thank to you both!! :bow::bow: