i have one problem you might be able to help me with.
loop through 1 worksheet then delete what criteria i dont want then move onto the next worksheet in my workbook and do the same...
here is some of my code
Private Sub CommandButton3_Click()
'class
'inputbox find class
'generate new Workbook with the 5days init and delete wotever class wasnt picked
'loop through the sheet 9 hours and 13 class rooms
Dim g, block, start As Range
Dim ws As Worksheet
Dim class As String
Const maxrooms = 13
Const maxhours = 9
class = InputBox("Enter Class")
'if it is not the class selected then delete+ othwrise copy to new template
Set start = Range("B3")
Set block = Range(start, start.Offset(maxhours - 1, maxrooms - 1))
For Each g In block
g.Activate
Next g
If Value = class Then Delete (ActiveCell)
End Sub
Sub test()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
MsgBox ws.Name
Next ws
End Sub
loop through 1 worksheet then delete what criteria i dont want then move onto the next worksheet in my workbook and do the same...
here is some of my code
Private Sub CommandButton3_Click()
'class
'inputbox find class
'generate new Workbook with the 5days init and delete wotever class wasnt picked
'loop through the sheet 9 hours and 13 class rooms
Dim g, block, start As Range
Dim ws As Worksheet
Dim class As String
Const maxrooms = 13
Const maxhours = 9
class = InputBox("Enter Class")
'if it is not the class selected then delete+ othwrise copy to new template
Set start = Range("B3")
Set block = Range(start, start.Offset(maxhours - 1, maxrooms - 1))
For Each g In block
g.Activate
Next g
If Value = class Then Delete (ActiveCell)
End Sub
Sub test()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
MsgBox ws.Name
Next ws
End Sub