find worksheet by FindMethod
Dim nme As String
nme = TextBox1.Text & TextBox2.Text
Dim wk As Worksheet
On Error Resume Next
set wk = Worksheets(nme")
On Error Goto 0
if not wk is Nothing then
' worksheet exists (wk holds a reference to it)
--
Regards,
Tom Ogilvy
"CG Rosén" wrote in message
...
Good Day Group,
Trying to use the FindMethod to lookup if a Worksheet is present.
An effort to code as below. Seems I need further advise. Thankkful
for any help.
Brgds
CG Rosén
Dim nme As String
nme = TextBox1.Text & TextBox2.Text
Dim wk As Worksheets
Dim k
With ActiveWorkbook.Worksheets
Set k = .Find(????, LookIn:=????)
If Not k Is Nothing Then
code.....
End If
End With
|