Trying to write this code...
Its supposed to create sheets based on the contents of the cell O5 and keep going until the blank cell.
Please help! Whats wrong with my code?
Thanks,
tw33k
Its supposed to create sheets based on the contents of the cell O5 and keep going until the blank cell.
Please help! Whats wrong with my code?
Thanks,
tw33k
Code:
Sub mk_shts()
Dim ws As Worksheet 'Create a worksheet object
Set ws = Sheets.Add 'set worksheet Object to new sheet
Range("O5").Select 'selects the start cell
Do Until ActiveCell.Value = ""
Set ws = Sheets.Add 'set worksheet Object to new sheet
ws.Name = ActiveCell.Value 'rename sheet
ActiveCell.Offset(1, 0).Select
Loop
End Sub