LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying and pasting entire workbook

Hi,

I'm trying to write a load function which loads a workbook, copies it
contents, closes it and pastes the copied information into the workboo
that was open all the time (replacing what is already in there).
can't figure out how to do it. I really don't want to copy/paste i
sheet by sheet.


This is what I have:


Code
-------------------

Dim sFname As String

sFname = Application.GetOpenFilename( _
FileFilter:="Excel Workbooks,*.xls", _
Title:="Open a File", _
MultiSelect:=False)

If sFname < "False" Then
Workbooks.Open sFname

Workbooks(2).Worksheets.Copy
Workbooks(2).Close False

' This is what I would like to be able to do.
Workbooks(1).Worksheets.Paste
End If

-------------------


Any ideas?

Thanks in advance

--
Message posted from http://www.ExcelForum.com

 
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
Copying and pasting links within the same workbook GEwan Excel Worksheet Functions 0 June 8th 09 05:50 PM
Copying/Linking Entire Workbook TomP Excel Discussion (Misc queries) 2 October 6th 08 10:09 PM
Copying store numbers and pasting them into a seperate workbook punter Excel Discussion (Misc queries) 2 May 26th 06 11:24 PM
Copying and pasting ??? NorcalTruck Excel Discussion (Misc queries) 3 December 27th 05 08:31 PM
Copying & Pasting Michael[_10_] Excel Programming 1 August 28th 03 11:00 AM


All times are GMT +1. The time now is 08:31 PM.

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

About Us

"It's about Microsoft Excel"