A BIG Thanks for that, one question though to add on it........
How do I get that same Invoice number into the actual worksheet into a
cell?
Regards Kevin
>This uses names like:
>
[quoted text clipped - 70 lines]
>> Kevin J Prince
>> http://www.1and1.co.uk/?k_id=5257507

Signature
"I live in my own little world.
But it's OK. They know me here."
= = = =
Kevin J Prince
http://www.1and1.co.uk/?k_id=5257507
Option Explicit
Sub testme()
Dim iCtr As Long
Dim TestWks As Worksheet
Dim NameToUse As String
iCtr = 0
Do
iCtr = iCtr + 1
NameToUse = "INVOICE " & Format(iCtr, "00")
Set TestWks = Nothing
On Error Resume Next
Set TestWks = Worksheets(NameToUse)
On Error GoTo 0
If TestWks Is Nothing Then
'found a worksheet name that doesn't exist
Exit Do
Else
'already exists, keep looking
End If
Loop
Worksheets("Template").Copy _
after:=Worksheets(Worksheets.Count)
With ActiveSheet
.Name = NameToUse
.Range("A999").value = NameToUse
End With
End Sub
> This uses names like:
>
[quoted text clipped - 74 lines]
>
> Dave Peterson

Signature
Dave Peterson
Kevin J Prince - 05 Sep 2007 22:19 GMT
THANKS Dave,
Yes a big thanks, very helpful and works a treat.
Made a couple of mods
1.
As I had already done the first 29 the hard way ;-}
> iCtr = 30
> Do
2.
That's where I wanted the value (figure only)
> With ActiveSheet
> .Name = NameToUse
> .Range("E3").value = iCtr
> End With
Excellent NG, I should keep my eyes on it far more than I do.
Best Regards
Kevin
>Option Explicit
>Sub testme()
[quoted text clipped - 109 lines]
>>
>> Dave Peterson

Signature
"I live in my own little world.
But it's OK. They know me here."
= = = =
Kevin J Prince
http://www.1and1.co.uk/?k_id=5257507
Charlie Gowen - 13 Sep 2007 15:49 GMT
Dave, this worked great. Is there a way to generate additional sheets with the value of a cell, e.g., A1, incorporated in the Tab Name?
Thanks,
Charlie in Virginia Beach
EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com
Dave Peterson - 13 Sep 2007 16:04 GMT
Probably. But if you're using a single cell (A1), then wouldn't you only be
able to generate a single sheet?
Charlie, Gowen wrote:
> Dave, this worked great. Is there a way to generate additional sheets with the value of a cell, e.g., A1, incorporated in the Tab Name?
>
[quoted text clipped - 3 lines]
> EggHeadCafe - .NET Developer Portal of Choice
> http://www.eggheadcafe.com

Signature
Dave Peterson