+ Reply to Thread
Results 1 to 3 of 3

Text Box and Combobox

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Cayman Islands
    MS-Off Ver
    Excel 2010
    Posts
    2

    Text Box and Combobox

    Depending on the option of the combobox I want that in my text box show up the cell immediately below .

    Example:
    in cell j3 is the number 1 which show up in my combobox
    i want that in my text box show up the value of the cell j4

    the code that I use and works fine for the combobox is these

    any ideas ?
    Thank You

    =============================================

    Don't work at all
    Private Sub ComboBox2_Change()
    Dim i As Integer
    Dim MyArray As Variant
    MyArray = WorksheetFunction.Transpose(Worksheets("sheet1").Range("J3:AG3"))

    For Each cell In MyArray
    Me.TextBox18.Value = Me.ComboBox2(MyArray.Offset(1, 0))

    Next


    End Sub

    ====================================================================
    'Works fine

    Private Sub UserForm_Initialize()
    Dim i As Integer
    Dim MyArray As Variant

    MyArray = WorksheetFunction.Transpose(Worksheets("sheet1").Range("J3:AG3"))

    For Each cell In MyArray
    Me.ComboBox2.AddItem (cell)
    Next

    ComboBox1.List = Array("Helena Soares Carneiro", "Jose Carlos Monteiro", "Alex Urtubia", "Gonçalo Alves", "Rui Baptista", "Carlos Pires")

    End Sub

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Text Box and Combobox

    Maybe
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    Cayman Islands
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Text Box and Combobox

    Thank you very much David

+ 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] If ComboBox = Certain Text then Help
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-07-2013, 12:59 PM
  2. [SOLVED] How to het the text in a combobox be something not in the list?
    By AdLoki in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2013, 09:31 AM
  3. Filling Combobox Based on another combobox.text value.
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 02-18-2012, 01:20 AM
  4. Format combobox as Text
    By iturnrocks in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-13-2007, 01:59 AM
  5. Formating Text in a combobox
    By scalpa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-16-2005, 09:15 AM

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