Part of a script I am writing creates a new worksheet in exceI which will be
used to capture errors daily from the script.  I can create the new sheet no
problem but since it is an additional sheet everyday (new log everyday) I
won't know the name by which to reference it and be able to rename it.  I
have pasted the section that does this work but what I have so far doesn't
do anything.  Any ideas?? 

ExcelApp.Worksheets.Add  'Add a new sheet to the Excel File
    ExcelApp.Worksheets(ExcelApp.ActiveSheet).Name = strErrorWorksheet
'Rename the new sheet, appears to only respond when the original sheet name
is used
    ExcelApp.Worksheets(strErrorWorksheet).Move
after:=ExcelApp.Worksheets(strSheet)
    ExcelApp.Worksheets(strErrorWorksheet).Range("A1:Z1000").ClearContents
    ExcelApp.Worksheets(strSheet).Select

Scott Zimmerman, LIS Analyst
UMass Memorial LIS Department
Phone:  508-334-7237
Pager:  508-426-2178

> "The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, transmission, re-transmission, dissemination or
> other use of, or taking of any action in reliance upon this information by
> persons or entities other than the intended recipient is prohibited. If
> you received this in error, please contact the sender and delete the
> material from any computer."  
> 
> 

Reply via email to