I want to name a worksheet. I want the name to be the current date. If there already exists a worksheet with that name I want to add time to the name. The problem is that I do not know how to add time to the name of the worksheet. pls help me! any help appreciated!
i = Worksheets.Count
Worksheets.Add Count:=1, After:=Sheets(i)
For j = 1 To i
If Sheets(j).Name = Date Then
blnTodaySheet = True
End If
Next
If blnTodaySheet = True Then
Sheets(i + 1).Name = Date + Time
Else
Sheets(i + 1).Name = Date & ":" & Time
End If
i = Worksheets.Count
Worksheets.Add Count:=1, After:=Sheets(i)
For j = 1 To i
If Sheets(j).Name = Date Then
blnTodaySheet = True
End If
Next
If blnTodaySheet = True Then
Sheets(i + 1).Name = Date + Time
Else
Sheets(i + 1).Name = Date & ":" & Time
End If