Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Darius
 
Posts: n/a
Default 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   Report Post  
Mel Arquiza
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem encountered when cutting and pasting limws1 Excel Discussion (Misc queries) 2 July 18th 05 10:45 AM
Empty Workseek: File still too large (>300k) Anik Excel Discussion (Misc queries) 2 March 16th 05 06:21 PM
Large Excel file size caused by a bug ? I really tried everything Anik Excel Discussion (Misc queries) 5 March 16th 05 06:19 PM
Allow the pasting of a .jpg or other image file into a cell in Ex. Don Saunders Excel Worksheet Functions 1 January 28th 05 10:01 PM
Using Jet to read excel file returns blank for last cell - sometim Ron Excel Discussion (Misc queries) 1 December 9th 04 08:21 AM


All times are GMT +1. The time now is 11:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"