If you wish to use the cell value, this method will work:
sheetname = ThisWorkbook.Worksheets("Sheet1").Range("A1").Value
ThisWorkbook.Worksheets(sheetname).Activate
LEts say that you have a new value in the column....this will error out, because the sheet does not exist. So to fix this, we can see if it exists first, as in:
Function sheetexist(whatsheet)
On Error GoTo NotExists
ThisWorkbook.Worksheets(whatsheet).Select
sheetexist = True
Exit Function
NotExists:
sheetexist = False
End Function
To use it, we would go:
sheetname = ThisWorkbook.Worksheets("Sheet1").Range("A1").Value
doesitExist = sheetexist(sheetname)
if doesitexist then
ThisWorkbook.Worksheets(sheetname).Activate
end if
Then we can take it one step further, to create the sheet, as in:
Sub makesheet(whatsheet)
On Error GoTo ExitSub
With ThisWorkbook
.Sheets.Add(After:=.Sheets(.Sheets.Count)).Name = whatsheet
End With
ExitSub:
End Sub
All together, it would be like this:
sheetname = ThisWorkbook.Worksheets("Sheet1").Range("A1").Value
doesitexist = sheetexist(sheetname)
If doesitexist Then
ThisWorkbook.Worksheets(sheetname).Activate
Else
makesheet (sheetname)
End If
I hope this helps out, and you have learned something... Let us know what is next.
Have FUN!