Results 1 to 6 of 6

Thread: [RESOLVED] Include Spreadsheet object in UserForm

  1. #1

    Thread Starter
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Resolved [RESOLVED] Include Spreadsheet object in UserForm

    Is it possible to include a variable size, both rows and columns, spreadsheet object in a user form and have it link back to a range in the main xls file?



    thanks
    Declan

  2. #2
    Lively Member JustinLabenne's Avatar
    Join Date
    Jul 2005
    Location
    Ohio
    Posts
    64

    Re: Include Spreadsheet object in UserForm

    There is a spreadsheet control you can use form the Userfro mToolbox under additional controls.

    Not real sure right off about Linking, but this is a workaround:
    VB Code:
    1. Private Sub UserForm_Activate()
    2. Spreadsheet1.Range("A1").Value = Range("A1").Value
    3. End Sub
    Justin Labenne
    www.jlxl.net

  3. #3
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Include Spreadsheet object in UserForm

    Not too sure as to why you would want to link back to the original file.. you might want to look into pulling the range into an array and then displaying it inside a list box.

    What exactly are you trying to achieve here..
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  4. #4

    Thread Starter
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Include Spreadsheet object in UserForm

    I need the user to see and potentially edit the data in this range and my problem is letting edits occur while the code is running.

    Thats why I'm exploring copying the data from the range into a temp s/sheet (held in a form) and then writing back to my main range.

    I hope this makes sense...

  5. #5
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Include Spreadsheet object in UserForm

    If you want to allow the editting of the spreadsheet behind then Link like Justin has pointed out.
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  6. #6

    Thread Starter
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: [RESOLVED] Include Spreadsheet object in UserForm

    Thanks Justin - thats just what I needed.

Posting Permissions

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



Click Here to Expand Forum to Full Width