Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a new worksheet?


Hi,

Just wondering how I could create a new worksheet from within a macro?

Cheers

Sahil

EDIT: I'd also like to know how to create new workbooks from a macro
and how to name the individual workbooks/worksheets

--
schouja
-----------------------------------------------------------------------
schoujar's Profile: http://www.excelforum.com/member.php...fo&userid=2657
View this thread: http://www.excelforum.com/showthread.php?threadid=40068

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a new worksheet?


Sheet

ActiveWorkbook.Sheets.Add Befo=Worksheets(Worksheets.Count)


Workbook

Workbooks.Add


Check VBA help, type ADD, and press F1



Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=40068

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Creating a new worksheet?

use a worksheet object for greater control...

DIM ws as Worksheet
SET ws = worksheets.add
with ws
.Name = "myNewSheet"

.Range("A1") = format$(Date,"dd-mmm-yy HH:MM")

end with





"schoujar" wrote:


Hi,

Just wondering how I could create a new worksheet from within a macro?

Cheers

Sahil

EDIT: I'd also like to know how to create new workbooks from a macro.
and how to name the individual workbooks/worksheets?


--
schoujar
------------------------------------------------------------------------
schoujar's Profile: http://www.excelforum.com/member.php...o&userid=26574
View this thread: http://www.excelforum.com/showthread...hreadid=400685


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
Creating a Worksheet zephyr Excel Discussion (Misc queries) 2 September 11th 06 07:25 AM
Creating an inventory worksheet Black friday Excel Discussion (Misc queries) 1 April 19th 06 10:21 PM
Creating a worksheet in Spanish Kent Excel Discussion (Misc queries) 1 March 1st 05 05:16 PM
Creating a Worksheet in VBA Jako[_13_] Excel Programming 1 June 8th 04 11:09 PM
Creating a new worksheet from another Sheeny[_13_] Excel Programming 2 May 25th 04 06:14 PM


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