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: 11
Default Copying aenother workbook's sheets

In VBA in Excel 2003, I'm trying, from within one workbook, to open
another workbook, copy one sheet, and past it into sheet 3 of the
calling workbook. I believe I did it something like this:


Dim wbTarget AS Workbook


Set wbWorkbook = "somepath\somesheet.xls".open
wbWorkbook.sheet3.activate
wbWorkbook.sheet3.select
wbWorkbook.sheet3.copy
wbWorkbook.close
ThisWorkbook.sheets(3).activate
ThisWorkbook.sheets(3).cells(1,1).select
ThisWorkbook.sheets(3).cells(1,1).paste


Now, this is from memory of what I left off doing Friday afternoon, so I
may be a bit off. I believe that I had set s string variable to hold
the contents of the COPY operation, but when it was pasted into sheet3
of the calling workbook, all I ended up with was the variable name
itself pasted into the last cell of the copy area - and nothing else.
In other words, all I saw was something like the value strSource in cell
(10, 50) with all other cells on sheet3 blank. Since this is neither
very useful nor what I'm trying to do, I could use a push in the right
direction. My thanks in advance.



Henry
DPM Mellon

 
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
List of All Workbook's Worksheets jonoro Excel Worksheet Functions 4 December 21st 09 09:51 PM
REMOVING WORKBOOK'S ALL FORMULAS FARAZ QURESHI Excel Discussion (Misc queries) 3 November 4th 08 11:08 AM
easy way to Consolidate Data within one workbook's various workshe estimator Excel Worksheet Functions 1 February 20th 06 01:30 AM
Workbook's BaseTemplate Sonny Maou Excel Programming 1 February 23rd 04 09:15 PM
How to force Workbook's macro unloading? Mauricio Villada Excel Programming 0 September 22nd 03 10:09 PM


All times are GMT +1. The time now is 12:59 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"