does workbook contain worksheet
'-----------------------------------------------------------------
Function SheetExists(Sh As String, _
Optional wb As Workbook) As Boolean
'-----------------------------------------------------------------
Dim oWs As Worksheet
If wb Is Nothing Then Set wb = ActiveWorkbook
On Error Resume Next
SheetExists = CBool(Not wb.Worksheets(Sh) Is Nothing)
On Error GoTo 0
End Function
--
HTH
RP
"asmenut" wrote in message
...
I am creating a series of userforms that
1) checks if the open workbook contains a specific worksheet.
2) Loads a textbox in the form with data from a cell
3) allows the text to be added to
4) Re-loads the modified text to the cell
5) Saves the worksheet
I am having trouble getting the sheet verification and the textbox to load
the cell text. Any ideas?
|