Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jan 2004
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    View data in sheet (2000)

    Hi all,

    I am trying to display information in a userform in a grid-type format, that displays data from a named range and then allows the user to change the data in the userform. I just cant work out how to use the grids... on the initialisation of the userofrm, I try doing
    <control name>.controlsource = "<named range>"
    but I just keep getting an 'Invalid property value' error. I am probably missing something basic, but I just cant work this out! Can anyone help??

    Thanks
    JB

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: View data in sheet (2000)

    Could you elaborate on what you are trying to do? What kind of object are you trying to work with?

    If you want to create a "grid" you could add several textboxes into a grid format (if you want 10 x 10 grid you would need 100 textboxes arranged). Then you could loop thru the cols and rows of the range and read them into the appropriate textbox. When the user is done you could have a command button to accept the changes, and run the code to read from the textboxes into the cells.

    This routine could contain validation routines as well as conversion of the text values to other types of data in case you need something other than text in the range.

    Hope this helps, if you need more specific answers please post back.
    Steve

  3. #3
    New Lounger
    Join Date
    Jan 2004
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: View data in sheet (2000)

    Sorry for the lack of details. I dont actually know what object I want - some sort of grid control. I do not want to use text boxes, as while there could be up to 100 records, there are 6 fields in each record, so that means 600 text boxes.... what I want is one control that will display all the data and allow you to scroll through the records.

    Thanks
    Jenny

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: View data in sheet (2000)

    There are ActiveX grid controls, but they don't come with the standard edition of Office, so you would have problems if you wanted to distribute the workbook.

    It might be easier to use the form that Excel can create automatically through Data | Form... It will display only one record at a time, but it will allow the user to scroll through the records, and you don't have any maintenance problems.

    If you have Microsoft Access, you could create an Access form for the Excel data using the AccessLinks add-in. Type Create a Microsoft Access form for a Microsoft Excel list into the Office Assistant or Answer Wizard in Excel, then click Search to learn how to do this.

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: View data in sheet (2000)

    If you go the "data-form route" you might want to check out John Walkenbacch's Enhanced Data form

    Steve

Posting Permissions

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