Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Do you know how to create a new sheet in a file by macro?


I need to export data to a file and seperate the data every day.

Do you know how to create a new sheet in a file by macro? How to apply
an existing macro to a new file without creat marcro and copy the code
every time? Because when I export data to a existing file, the macro
is lost.


Thanks a lot ! ---new bird


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Do you know how to create a new sheet in a file by macro?

The simplest way is to have a "template" worksheet that
contains the macro. Copy this sheet to the new workbook
then copy the data onto the sheet, viz.
ThisWorkbook.Worksheets("templateSheet").Copy
Set myNewSheet = ActiveSheet

This will copy the named sheet into a new workbook and
retain a reference to the new sheet for data transfer

Kevin Beckham

-----Original Message-----

I need to export data to a file and seperate the data

every day.

Do you know how to create a new sheet in a file by

macro? How to apply
an existing macro to a new file without creat marcro and

copy the code
every time? Because when I export data to a existing

file, the macro
is lost.


Thanks a lot ! ---new bird


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Do you know how to create a new sheet in a file by macro?


Thanks!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

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
Macro to create new sheet Kim Excel Discussion (Misc queries) 5 April 25th 09 02:51 AM
macro to create, name sheet and copy. sutha Excel Discussion (Misc queries) 4 December 23rd 08 01:53 PM
how to create a chart of a sheet from a xsl file that is on a url Perdizes Charts and Charting in Excel 0 June 6th 07 05:33 PM
How can you create a macro on a protected sheet? Felix Excel Discussion (Misc queries) 2 February 23rd 06 12:37 AM
Macro to insert values from a file and save another sheet as a .txt file Frank[_16_] Excel Programming 2 August 28th 03 01:07 AM


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

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"