Copying the data from the other worksheet

  • Thread starter Thread starter Sylvia
  • Start date Start date
S

Sylvia

Hi..

I have to write one macro which will add a button allowing Copy
function. This button should allow us to copy the whole contents of
some another Excel file (containing single tab) into the currently open
file.

For this I also need to add a search box which will allow me to search
and select the file in windows after clicking on the above button and
then proceed further..

Can anyone help me for this please?

Thanks,
Sylvia
 
To get a filename from a user try the Application.GetOpenFilename method.

Sub a()
Dim FName As Variant
FName = Application.GetOpenFilename("Excel files (*.xls),*.xls")
If FName = False Then
MsgBox "User canceled"
Else
Workbooks.Open FName
End If
End Sub


--
Jim
message |
| Hi..
|
| I have to write one macro which will add a button allowing Copy
| function. This button should allow us to copy the whole contents of
| some another Excel file (containing single tab) into the currently open
| file.
|
| For this I also need to add a search box which will allow me to search
| and select the file in windows after clicking on the above button and
| then proceed further..
|
| Can anyone help me for this please?
|
| Thanks,
| Sylvia
|
|
| --
| Sylvia
| ------------------------------------------------------------------------
| Sylvia's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=30300
| View this thread: http://www.excelforum.com/showthread.php?threadid=500588
|
 

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

Back
Top