+ Reply to Thread
Results 1 to 2 of 2

reading from another file and pasting to current file, "combobox"

  1. #1
    Darius
    Guest

    reading from another file and pasting to current file, "combobox"

    Can anybody please help me know how I can do this:
    I have a file lets name it "result.xls" also I have lets say 100 files and
    again suppose the names are "aa.xls", "bb.xls", ..., I want to put a combobox
    in file, "result.xls" click on that I be able to see the names of those 100
    files, then if I select one of them, this copy some data from various cells
    in the source file and paste it to specific cells (e.g. B2:F4) in the
    "result.xls" file.
    Best
    Darius

  2. #2
    Mel Arquiza
    Guest

    RE: reading from another file and pasting to current file, "combobox"

    Hi Darius,

    See if this works for you. This is just an example.

    'You need to have combobox, & picturebox.

    Const PictDir As String = "C:\" 'change which drive and path you want.

    Private Sub ComboBox1_Click()
    With Me.ComboBox1
    Image1.Picture = LoadPicture(PictDir & ComboBox1.Text)
    End With
    End Sub

    Private Sub UserForm_Activate()
    Dim F

    F = Dir(PictDir & "*.jpg")

    Do While Len(F) > 0
    With ComboBox1 'this loads the combo
    .AddItem F
    End With
    F = Dir()
    Loop

    End Sub

    "Darius" wrote:

    > Can anybody please help me know how I can do this:
    > I have a file lets name it "result.xls" also I have lets say 100 files and
    > again suppose the names are "aa.xls", "bb.xls", ..., I want to put a combobox
    > in file, "result.xls" click on that I be able to see the names of those 100
    > files, then if I select one of them, this copy some data from various cells
    > in the source file and paste it to specific cells (e.g. B2:F4) in the
    > "result.xls" file.
    > Best
    > Darius


+ 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