PDA

View Full Version : [SOLVED] vba code for an interface



aiman015
05-17-2020, 10:28 PM
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
https://ibb.co/qJxcVYc26693

Bob Phillips
05-18-2020, 02:08 AM
You say that you got stuck, so show us what you have so far, preferably a sample workbook.

Fluff
05-18-2020, 04:37 AM
Cross posted https://www.mrexcel.com/board/threads/help-with-vba-code-for-an-interface.1134415/

Paul_Hossler
05-18-2020, 07:28 AM
Cross posted https://www.mrexcel.com/board/thread...rface.1134415/ (https://www.mrexcel.com/board/threads/help-with-vba-code-for-an-interface.1134415/)

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

26698


Working prototype POC using radio buttons in the attachment

aiman015
05-18-2020, 08:21 AM
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