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?
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?
Last edited by schoujar; 08-31-2005 at 01:38 AM. Reason: additional question
Sheet
ActiveWorkbook.Sheets.Add Before:=Worksheets(Worksheets.Count)
Workbook
Workbooks.Add
Check VBA help, type ADD, and press F1
Mangesh
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
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks