1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

[Excel, VBA] Add the value taken from the user to my range for ActiveX ComboBox

Discussion in 'Programming' started by niksirat, Aug 27, 2022.

  1. #1
    Hi everyone,

    I defined
    • a ActiveX ComboBox named "cmbPeymankar",
    • a Text Box (ActiveX control) called "txtNewPeymankar".
    • a Command Button (ActiveX control) called "Add".
    I have a table named "Table1" in sheet "DATA" so that the first column of Table1 contains the names that should be displayed in the cmbPeymankar list and 10 items are already written in it.

    I have three questions:
    1. How to define the value of "ListFillRange" of cmbPeymankar so that the values of column 1 of Table1 are displayed in its list?
    2. What command should I write for Add button to add the value taken from the user for txtNewPeymankar to the end of the column 1 of Table1?
    3. The value of cmbPeymankar can be selected from its list. If the user wants to type its value, how can I write an error message if the entered value is not equal to any of the predefined items for cmbPeymankar (in column 1 of Table1)?

     
    niksirat, Aug 27, 2022 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #2
    ActiveX was canned in 2013 and doesn't work on mobile.

    How committed are you to using activex given a combo box, text box, and button are standard HTML elements?

    Can you set up an example on a site like codepen for us to look at?
     
    sarahk, Aug 27, 2022 IP
  3. niksirat

    niksirat Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    My problem is in excel and vba.
     
    niksirat, Aug 27, 2022 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #4
    Really, you probably should have made that clearer upfront. I'll add it to the thread title. My days of messing with vba were a long time ago. I don't even have excel on my laptop. Hopefully someone else can help.
     
    sarahk, Aug 28, 2022 IP