Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
deepa prabhakar
 
Posts: n/a
Default Code to create atbs in excel sheet


My doubt is this.
I need to write a program to open an excel sheet and copy 3 excel sheet
into single .xls file which should contain 3 excel sheets.How do i
proceed?


--
deepa prabhakar
------------------------------------------------------------------------
deepa prabhakar's Profile: http://www.excelforum.com/member.php...o&userid=34821
View this thread: http://www.excelforum.com/showthread...hreadid=545774

  #2   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default Code to create atbs in excel sheet


To create your new workbook with three sheets you can use

Sub Test()
Workbooks.Add
If ActiveWorkbook.Sheets.Count < 3 Then
For N = 1 To 3 - ActiveWorkbook.Sheets.Count
Sheets.Add
Next N
ElseIf ActiveWorkbook.Sheets.Count 3 Then
Application.DisplayAlerts = False
For N = 1 To ActiveWorkbook.Sheets.Count - 3
Sheets(1).Delete
Next N
Application.DisplayAlerts = True
End If
End Sub


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=545774

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
How can I create a link between cells in two separate Excel sheet Dawnmarie Excel Worksheet Functions 1 April 18th 06 06:34 PM
using excel how would I create sheet for adding mileage? Coop Setting up and Configuration of Excel 1 January 22nd 06 07:05 PM
Macro for changing text to Proper Case JPriest Excel Worksheet Functions 3 August 8th 05 09:31 PM
Getting Excel Data from One Sheet to Another.... Robin Excel Discussion (Misc queries) 2 April 21st 05 01:15 PM
Make Change Case in Excel a format rather than formula Kevin Excel Worksheet Functions 1 March 18th 05 08:53 PM


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