PDA

View Full Version : Copy paste with listbox in excel



teodormircea
02-27-2008, 05:04 AM
Hello everyone i need a little help for a macros that does the fololowing things

I would like from an exceel sheet open a browser file , search for an excel file or workbook and then, display in a listox the information about this excel file or workbook (the list of sheets and the colomns that contains everyone (i think headers it will be better).Then chose a sheet, columns of this sheet and copy them in the workbook that contain the macros, in the sheet that i have to chose , and the place that i have to chose(it can be used a cell like reference, because i can copy several columns from other filles in the same sheet but different place).
And all this with a macros :banghead:

Thnaks for your help guys

tstav
02-27-2008, 05:40 AM
To be honest, your post sounds to me like an assignment of a project rather than an inquiry for some specific help on a specific problem.
Wouldn't it be better if you told us what you have already done (in VBA I mean) and then ask for a specific assistance which we will be glad to provide if we can?
Greetings!

teodormircea
02-27-2008, 06:49 AM
Well , honest i have nothing where to start from, I've done some research on internet but nothing to help me so yes i will need assistance if is possible.

teodormircea
02-27-2008, 07:02 AM
HERE IS AN EXEMPLE OF AN "USERFORM "

teodormircea
02-28-2008, 03:00 AM
I'm gone make it more simple. Browse for a file(don;t open it), copy column from (chose the columns) and copy in the active workbook in sheet ORIGINAl in place (chose) the place
Till now u know how to browse for a file,
Sub Open()
File = Application.Dialogs(xlDialogOpen).Show
MsgBox File
End Subbut this procedure is gone open the file , and i don't want to open it, i need a macro that is gone identify the columns of this file (by headers), chose them , and copy them in active workbook in sheet ORIGINAL in a place that by clicking directly on the sheet's cell

teodormircea
02-28-2008, 04:02 AM
this is an exemple of an code for a list box .
here the path of the fils is given but i want to modify so i can ,
1. search for this file
2.chose columns
3.copy in active workbook in the first sheet in the place were i click on the sheet