Hi all,

I'm in the process of jazzing up my Excel stuff and am adding macros to SaveAs and open dialog boxes etc etc. I now want to generate a incremented number (+1) based on the numeric part of the last filename in a particular folder and display that value in a cell on the template just opened. Only part of the filename is a number and the rest is text eg (Xs for letters) XXX 0099 XXXXXX.

I don't want to directly save as I already have a macro that does that part in the way that suits me but rather want the number to be displayed before entering any new data.

One "Gareth" posted some code on this last year which looks as if it's in the right direction but I must be on the wrong road because I couldn't make it work for me.

All help gratefully received,

Many thanks in advance,

DS