The following sub to create and name wsheets results naming the new sheet with the value of "A9" only, but what I want to name the new sheet is "A9" + "B9". Where have I gone wrong?
Thanks.
Sub CreateWorksheets()
Dim newSheet As Worksheet, itemSheet As Worksheet
Dim cell As Object
Dim itemrange As String
Set itemSheet = Sheets("BIDFORM")
Application.ScreenUpdating = False
itemrange = "A9:B9:" & itemSheet.Range("A9").End(xlDown).Address
For Each cell In itemSheet.Range(itemrange)
If SheetExists(cell.Value) = False Then
Sheets.Add Before:=Sheets("BACK SHEET"), _
Type:="C:\Path\File"
Set newSheet = ActiveShee
newSheet.Name = cell.Value
End If
Next cell
Application.ScreenUpdating = True
End Sub
Thanks.
Sub CreateWorksheets()
Dim newSheet As Worksheet, itemSheet As Worksheet
Dim cell As Object
Dim itemrange As String
Set itemSheet = Sheets("BIDFORM")
Application.ScreenUpdating = False
itemrange = "A9:B9:" & itemSheet.Range("A9").End(xlDown).Address
For Each cell In itemSheet.Range(itemrange)
If SheetExists(cell.Value) = False Then
Sheets.Add Before:=Sheets("BACK SHEET"), _
Type:="C:\Path\File"
Set newSheet = ActiveShee
newSheet.Name = cell.Value
End If
Next cell
Application.ScreenUpdating = True
End Sub