VBA, Make a new sheet if it doesn't exist
Sub Button1_Click()
inset = Range("B3").Value
Sheets.Add
ActiveSheet.Name = "inset"
On Error GoTo Dele
Sheets("sdfs").Select
Range("A2").Select
Dele: ActiveSheet.Delete
End Sub
I'm wanting this button to make a new sheet within the workbook, named as
whatever is in B3 on the same sheet as the button. I only want it to do this
if this sheet does not already exist.
Its for recording productivity, and each sheet will be a person, and I want
part of the code to make a new sheet if that person doesn't already have a
sheet, new staff etc.
|