Thread
:
Sub Auto_Open() - Sheet name - error code
View Single Post
#
3
Posted to microsoft.public.excel.programming
[email protected]
external usenet poster
Posts: 31
Sub Auto_Open() - Sheet name - error code
i new to excel vba - can you give me the complete code which would
leave the workbook unchanged if a sheet already exist with todays date
thxs
wrote:
Sub Auto_Open()
Dim SH As Worksheet
Set SH = Worksheets(Worksheets.Count)
Worksheets.Add after:=SH
Worksheets(Worksheets.Count).Name = Format(Date, "yyyymmdd")
End Sub
What additional code do i need to add & where - in order not to get an
error message if sheet name already exists when opening file a second
time
Thxs
Reply With Quote
[email protected]
View Public Profile
Find all posts by
[email protected]