This is what i have so far this creates the sheets
[VBA]
Sub ShtCreate()
Dim mycell
Dim rng As Range
Set rng = Sheets("Front").Range("A2:A50")
For Each mycell In rng
If mycell.Value = "" Then
ElseIf mycell.Value <> "" Then
Sheets.Add
ActiveSheet.Name = mycell.Value
End If
Next
End Sub
[/VBA]This removes all blank cells and saves as Report Summary
[VBA]
Sub SummarySave()
Dim rng As Range
Dim sh As Worksheet
Dim oRow As Range
Dim cSheets As Long
For Each sh In ActiveWorkbook.Worksheets
Application.DisplayAlerts = False
If sh.Name <> "Front" Then
Set rng = Nothing
End If
For Each oRow In sh.UsedRange.Rows
If Application.CountA(oRow.EntireRow) = 0 Then
If rng Is Nothing Then
Set rng = oRow.EntireRow
Else
Set rng = Union(rng, oRow.EntireRow)
End If
End If
Next oRow
If Not rng Is Nothing Then
rng.Delete
End If
Next sh
ActiveWorkbook.SaveAs "Report Summary"& Format(Date, "dd-mm-yyyy") & ".xls"
Set rng = Nothing
Set oRow = Nothing
Set sh = Nothing
Call ShDel
End Sub
[/VBA]
and this code is supposed to delete all worksheets from the original but leave the front sheet there, but it doesnt work!
[VBA]
Dim shM As Worksheet
ThisWorkbook = Mwb
For Each shM In Mwb
If shM.Name <> "Front" Then
sh.Delete
End If
Next
Set shM = Nothing
Application.DisplayAlerts = True
End Sub
[/VBA]
Any ideas?......one other thing when saving the workbook as Report Summary i would like to remove the sheet called front!
Regards,
Simon