Help with code
It still errors on s2=sName
"Jeff" wrote:
Remove Set from Set s2 = sName
s\b s2=sName
no need to set string data types.
"Ronbo" wrote:
With the following code I get the error message " "Type mismatch" on "Set
s2". What am I doing wrong?
Dim s1 As Worksheet, s2 As Worksheet
Dim sName As String
sName = Range("n7")
Worksheets.Add(After:=Sheets(Sheets.Count)).Name =
ActiveSheet.Range("n7").Value
Set s1 = ActiveSheet
Set s2 = sName
Thanks,
Ronbo
|