Consulting

Results 1 to 5 of 5

Thread: vba code for an interface

  1. #1
    VBAX Newbie
    Joined
    May 2020
    Posts
    3
    Location

    vba code for an interface

    hello guys,
    actually i am trying to make an interface for my workbook, and i started making it using vba, but i got stuck.
    FIRST: in "what do you want to do" section i want to print two possibilities : consumption and KPI.
    then if the user choose consumption,
    -->the second part "what kind of energy"print 3 possibilities (electricity,water,gaz)
    if else the user choose KPI,
    --> "what kind of energy" print 3 other possibilities (KPI1,KPI2,KPI3)
    Finally: each choice needs to be related to a worksheet, and send the user directly to that sheet named electricity or KPI1...etc by using the button "validate".
    the problem is i tried so many codes, but it didn't work.
    thanks a lot
    g77BlRl.jpg

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You say that you got stuck, so show us what you have so far, preferably a sample workbook.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3

  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    Tsk, tsk -- Please read the FAQ link in my sig about cross posting rules

    I'd just use radio buttons since the choices are so well defined

    Capture.JPG


    Working prototype POC using radio buttons in the attachment
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  5. #5
    VBAX Newbie
    Joined
    May 2020
    Posts
    3
    Location
    Thank you very much sir, u helped me a lot, im so sorry for the cross-posting.
    it's my bad. trust me i won't repeat it again

Posting Permissions

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