View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Marta Marta is offline
external usenet poster
 
Posts: 26
Default Inserting multiple worksheets

I got it to work and it's great! Thanks guys!!!!

"Don Guillett" wrote:

I tested Jim's and it is good. Send me your email address and I'll send you
my test workbook.

--
Don Guillett
SalesAid Software

"Marta" wrote in message
...
Hi Don,
I tried this as well but I get an error message when I try to run the
macro.
Only one sheets ends up getting inserted and it's called Template (2). I
have no idea how to fix this.

Marta

"Don Guillett" wrote:

Name a ws Template
Name a ws Days
on the days ws in a1 enter the date
12/1/

in a3 this formula (CORRECT FOR WORDWRAP)
=IF(A2="","",IF(IF(WEEKDAY(A2)=6,A2+3,A2+1)EOMONT H($A$2,0),"",IF(WEEKDAY(A2)=6,A2+3,A2+1)))

Execute this macro from the DAYS worksheet

Sub makedays()
lr = Application.Count(Columns(1)) + 1
For i = 2 To lr 'To 2 Step -1
Sheets("Template").Copy befo=Sheets("Template")
ActiveSheet.Name = Format(Sheets("Days").Cells(i, 1), "mmm dd")
Next i
End Sub

--
Don Guillett
SalesAid Software

"Marta" wrote in message
...
Hi,
I have a monthly workbook which has a separate sheet for each work day.
I
need to create more of these monthly workbooks and was wondering if
there
is
a way to insert more than one sheet at a time. I have a template for
the
worksheet but not for the workbook and last time I insterted each sheet
individually which was a pain. Also, I was wondering if there is a way
to
rename all the sheets at once ie: Dec. 1 to Dec. 31, it would be even
better
if you could only choose workdays and not include any weekends - ok ok
now
I
know I'm dreaming :-)

Thanks,
Marta