+ Reply to Thread
Results 1 to 7 of 7

Displaying Excel Sheet data on VBA userform

  1. #1
    Registered User
    Join Date
    05-17-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Displaying Excel Sheet data on VBA userform

    Hi,

    I have a table in an excel sheet as shown in the file attached with this post. I also have a user form with a command button and a text box.

    As you can see, the table has 4 columns and multiple rows. Based on the value in column 1(titled as "ID#"), I want to select the text displayed in columns 2,3 and 4 and display it as a table on the user form keeping all the formatting(color coding, column width and height etc) intact. I want this to happen when the user clicks the command button.

    Can someone please suggest me how to go about doing this? Would a text box work or would I have to use some other form of control? Please advise.

    Thanks a lot.
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Displaying Excel Sheet data on VBA userform

    Why a Word Document for Excel help?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    05-17-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Displaying Excel Sheet data on VBA userform

    Hi,

    Please find attached, the same table in excel format. Hope this helps.

    Thanks,
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-17-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Displaying Excel Sheet data on VBA userform

    I have still not been able to solve this one. Any ideas on this? Please help. Thanks!!

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Displaying Excel Sheet data on VBA userform

    A userform is meant for manipulating data, not formats.

    Use a listbox instead,
    columncount 4
    columnwidth 90;90;90;90

    Please Login or Register  to view this content.
    See attachment
    Attached Files Attached Files
    Last edited by snb; 05-21-2011 at 10:47 AM.



  6. #6
    Registered User
    Join Date
    06-06-2013
    Location
    pune
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Displaying Excel Sheet data on VBA userform

    can I do same for combo box VBA

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Displaying Excel Sheet data on VBA userform

    patil.rupesh1986

    Welcome to the forum.

    Unfortunately you have to start your own Thread as per forum rules.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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