Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem encountered when cutting and pasting | Excel Discussion (Misc queries) | |||
Empty Workseek: File still too large (>300k) | Excel Discussion (Misc queries) | |||
Large Excel file size caused by a bug ? I really tried everything | Excel Discussion (Misc queries) | |||
Allow the pasting of a .jpg or other image file into a cell in Ex. | Excel Worksheet Functions | |||
Using Jet to read excel file returns blank for last cell - sometim | Excel Discussion (Misc queries) |