Consulting

Results 1 to 11 of 11

Thread: Form selection

  1. #1
    VBAX Regular
    Joined
    Dec 2009
    Posts
    22
    Location

    Form selection

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

  2. #2
    VBAX Mentor
    Joined
    Apr 2009
    Location
    Kingsbury
    Posts
    423
    Location
    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

  3. #3
    VBAX Regular
    Joined
    Dec 2009
    Posts
    22
    Location
    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

  4. #4
    VBAX Regular
    Joined
    Dec 2009
    Posts
    22
    Location
    Created the form and made some comments on where I need help.. :-)
    Hope there's still someone willing to help me out.
    Thanks
    Attached Files Attached Files

  5. #5
    VBAX Mentor
    Joined
    Apr 2009
    Location
    Kingsbury
    Posts
    423
    Location
    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

  6. #6
    VBAX Regular
    Joined
    Dec 2009
    Posts
    22
    Location
    Quote Originally Posted by Rob342 View Post
    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.. :-)

  7. #7
    Does this work voor you?
    Attached Files Attached Files

  8. #8
    VBAX Regular
    Joined
    Dec 2009
    Posts
    22
    Location
    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!

  9. #9
    Hoi Hans,
    Like this?

    Cheers
    Attached Files Attached Files

  10. #10
    VBAX Mentor
    Joined
    Apr 2009
    Location
    Kingsbury
    Posts
    423
    Location
    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
    Attached Files Attached Files

  11. #11
    VBAX Regular
    Joined
    Dec 2009
    Posts
    22
    Location
    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!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •