Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Cheers, this is working great!
"Jon Peltier" wrote: There seems to be a line or two missing. Try this: Sub mynewsheets() Dim c As Range Dim ws As Worksheet For Each c In Range("myrange").Cells Set ws = Nothing On Error Resume Next Set ws = Worksheets(c.Value) On Error GoTo 0 If ws Is Nothing Then Worksheets.Add.Name = c.Value End If Next c End Sub - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ "PaulW" wrote in message ... Since my last post is pages behind, thought I'd repost to gain further help. Got this from my initial query (cheers Don Guillett) Sub mynewsheets() For Each c In Range("myrange") On Error Resume Next If Sheets.Name < c Then Sheets.Add.Name = c End If Next c End Sub I changed myrange to Range("B2:B8") where i've put some names. When I run the macro I get "Compile Error: Method or data member not found" and .Name is highlighted in the If Sheets.Name < c Then row. Am I not loading something I should be? Can anyone help? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookup function and compare | Excel Discussion (Misc queries) | |||
how do I make different col widths within same col. on same sheet | Charts and Charting in Excel | |||
Using a relative SHEET reference for source data in a chart | Charts and Charting in Excel | |||
How do I make excel startup in a specific sheet? | Excel Worksheet Functions | |||
Naming & renaming a sheet tab | Excel Worksheet Functions |