+ Reply to Thread
Results 1 to 6 of 6

Define activex combobox list by Array and def dbclick action in loop for multiple button

  1. #1
    Registered User
    Join Date
    11-16-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51

    Define activex combobox list by Array and def dbclick action in loop for multiple button

    I designed a UserForm.

    1- I want the value of ComboBox1 defined as an Array 01, 02, ... ,12 and ComboBox2 defined as an Array 1385, ... ,1410?

    2- How can I write a For loop that by double-clicking on any button from 1 to 34, the caption of that button along with the value of comb1 and combo2 will be stored in a variable named TARIKH?

    I mean

    TARIKH = "combo1.value" & "combo2.value" & commandbox(i).caption
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,522

    Re: Define activex combobox list by Array and def dbclick action in loop for multiple butt

    You already have Cllick event for CommandButton 2 to 32, so no need to have event procedure by withevents
    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  3. #3
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Define activex combobox list by Array and def dbclick action in loop for multiple butt

    @niksarat2030, if you refer back to one of your previous posts you will find the inclusion of a calendar form.
    By a small adjustment (two numbers) and referring to the combobox lists you would have a far cleaner and less code overhead app.
    Please, please stop using 'RowSource'
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Define activex combobox list by Array and def dbclick action in loop for multiple butt

    a quick demo form - how to intercept keypress and place result - select from the two comboboxes then from the numbered buttons - result goes to label box.
    twelve lines of very compact code
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-16-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51

    Re: Define activex combobox list by Array and def dbclick action in loop for multiple butt

    Quote Originally Posted by torachan View Post
    @niksarat2030, if you refer back to one of your previous posts you will find the inclusion of a calendar form.
    By a small adjustment (two numbers) and referring to the combobox lists you would have a far cleaner and less code overhead app.
    Please, please stop using 'RowSource'
    For reasons that are a bit complicated, I had to implement an idea in Excel using VBA and this is my first encounter with this programming language!!

    The manager of the company where I work has asked me to write a program (not very fast, of course) that gives the company's data (from contractors' information to production levels, etc.) by different users (storekeeper, manager, accounting officer, etc.) and finally prepare reports according to those data, including employee performance charts, efficiency levels, etc (In this post, I asked for help to add a bar graph to this form, but no one has helped me so far).

    Because the company's data is stored in many Excel sheets, at first I saw the only way to use VBA. And I don't know what is the best way. Of course, in 001 and 002 posts, I asked for some guidance. If you, as someone who has much more experience than me, can guide me.

  6. #6
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Define activex combobox list by Array and def dbclick action in loop for multiple butt

    I have looked at the above links, if the final goal is to be able to enable multi-user access via the web Excel is not the tool for you.
    Most 'Cloud' apps interacting with MySQL come with a financial overhead when used commercially (e.g. Oracle/Heatwave etc)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] ActiveX combobox dropdown list not displayed when used in multiple columns
    By dentler in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2021, 10:31 PM
  2. Creating ComboBox Multiple Column List From Array
    By Welshdpm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2020, 07:49 AM
  3. [SOLVED] Change properties of multiple activex buttons in 3 columns with a loop and an array
    By boardy in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-27-2020, 06:31 PM
  4. [SOLVED] ActiveX Combobox in worksheet when populating the list based on another Combobox get error
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2020, 10:54 AM
  5. [SOLVED] For Each Loop with Activex ComboBox
    By waimea in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 08-18-2018, 06:10 PM
  6. ActiveX Command Button combined with ActiveX List Boxes – VBA Code Needed
    By Stlcards13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2017, 02:56 PM
  7. ActiveX Combo Boxes - can I define the list to be displayed via formula?
    By pci1239 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2012, 06:59 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1