I have a workbook to record orders and when I add the current order to the history it creates a new page and then renames it to the value of B3.
It worked fine for a while, then suddenly this yaer everytime I try to add the order to history I get
I have checked and there are no sheets named what I'm trying to name it (the date formatted as daymonthyear (10Jan14). I tried changing B3 to something else before running the macro (Test This....Tape Deck....Work Please) and still get the same error.
It highlights the third line when I choose debug. So what's wrong with my code?
I have tried removing the code completely and putting it back in and get the same results.
It worked fine for a while, then suddenly this yaer everytime I try to add the order to history I get
Run-time error '1004': Cannot rename a sheet to the same name as another sheet, a referenced object library or a workbook referenced by Visual Basic
I have checked and there are no sheets named what I'm trying to name it (the date formatted as daymonthyear (10Jan14). I tried changing B3 to something else before running the macro (Test This....Tape Deck....Work Please) and still get the same error.
PHP:
Dim ws As Worksheet
For Each ws In Sheets
ws.Name = ws.Range("B3")
Next ws
It highlights the third line when I choose debug. So what's wrong with my code?
I have tried removing the code completely and putting it back in and get the same results.