i need to create a macro that prompts the user to.....

M

mbos015

i need to create a macro that prompts the user to select an xls file o
files from the harddrive and then copy the same range from eac
selected xls file (sheet 1) into the same spot on the current workboo
and sheet from where the macro was activiated.

anyone willing to take that on for me. I am mainly interested in how t
prompt the user with an open file prompt and then do stuff to th
opened file or files
 
B

BrianB

This will get you started :-

'----------------------------------------
Sub test()
Dim MyFile As String
Dim FromSheet As Worksheet
Dim ToSheet As Worksheet
'---------------------------
Set ToSheet = ActiveSheet
MyFile = Application.GetOpenFilename
If MyFile = "" Then End
Workbooks.Open (MyFile)
'---------------------------
Set FromSheet = ActiveWorkbook.Worksheets("Sheet1")
End Sub
'-----------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top