Thread
:
Help with code
View Single Post
#
3
Posted to microsoft.public.excel.programming
Don Guillett[_2_]
external usenet poster
Posts: 1,522
Help with code
Sub SimpleAddSheetandNameforCell()
sheets.Add(After:=Sheets(Sheets.Count)).Name = range("n7")
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Ronbo" wrote in message
...
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
Reply With Quote
Don Guillett[_2_]
View Public Profile
Find all posts by Don Guillett[_2_]