Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Copying shts from one wbk to another


What would be the equivalent in VBA code to the Right
click on the worksheet tab where you can then Copy the
sheet or sheets to another workbook (which in this case
would be a new one).

Can anyone help?

Many thanks
Jacqui
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Copying shts from one wbk to another

Hi Jacqui,

This macro will copy the first worksheet in the workbook where it runs
into a new workbook:

Sub CopySheet()
ThisWorkbook.Worksheets(1).Copy
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"jacqui" wrote in message
...

What would be the equivalent in VBA code to the Right
click on the worksheet tab where you can then Copy the
sheet or sheets to another workbook (which in this case
would be a new one).

Can anyone help?

Many thanks
Jacqui



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Copying shts from one wbk to another

One way:

ActiveWindow.SelectedSheets.Copy

In article ,
"jacqui" wrote:

What would be the equivalent in VBA code to the Right
click on the worksheet tab where you can then Copy the
sheet or sheets to another workbook (which in this case
would be a new one).

Can anyone help?

Many thanks
Jacqui

Reply
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
Change Chart Properties for Multiple Chart Shts using a Worksheet KUMPFfrog Charts and Charting in Excel 0 July 22nd 09 11:01 PM
VLOOKUP using the act shts tab name as a reference for the table_a timmulla Excel Discussion (Misc queries) 1 July 23rd 07 04:56 PM
copying the Hyperlink function result without copying the actual formula mcheng Excel Worksheet Functions 2 June 9th 07 02:43 AM
formula to add cells in multiple shts in the same wkbk busker Excel Worksheet Functions 2 August 9th 06 09:34 PM
How to Compare Rows on 2 shts .... Les Wegg Excel Discussion (Misc queries) 0 May 11th 05 03:25 PM


All times are GMT +1. The time now is 07:38 AM.

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

About Us

"It's about Microsoft Excel"