+ Reply to Thread
Results 1 to 2 of 2

Import from spreadsheet

  1. #1
    Kjeldc
    Guest

    Import from spreadsheet

    I have a userform with a spreadsheet on. I want to populate it with data from
    an other sheet in a workbook. Can someone help, please

    Regards

    kjeldc

  2. #2
    Kjeldc
    Guest

    RE: Import from spreadsheet

    Thanks sebastienm. Perfect. But also a little curius! I tryed the code in
    Form_Initialize, that did not work. Can you tell me why?

    "sebastienm" skrev:

    > Hi,
    > By 'a sheet on the userform' , do you mean a Microsoft Office SpreadSheet
    > control (Office Web Components) ?
    > If so, assuming your userform's sheet is Spreadsheet1 and assuming you have
    > a command button Commandbutton1:
    >
    > ' fill the sheet on userform from workbook data
    > Private Sub CommandButton1_Click()
    >
    > 'Eg1: by setting the range value
    > Spreadsheet1.Range("A1") = ThisWorkbook.Worksheets(1).Range("A1")
    >
    > 'Eg2: by copyoing from the source workbook and pasting to the
    > ' spreadsheet on the userform
    > ThisWorkbook.Worksheets(1).Range("A1:a10").Copy
    > Spreadsheet1.Range("A1").Paste
    >
    > End Sub
    >
    > --
    > Regards,
    > Sébastien
    > <http://www.ondemandanalysis.com>
    >
    >
    > "Kjeldc" wrote:
    >
    > > I have a userform with a spreadsheet on. I want to populate it with data from
    > > an other sheet in a workbook. Can someone help, please
    > >
    > > Regards
    > >
    > > kjeldc


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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