How do I write to a closed work book as a "register"



Hi there all you Gurus out there!
I have created a macro to create a unique invoice number in a work book, but
for my specific purpose, each time I create a new invoice number i want to
record this in a rolling register in a separate spreadsheet & workbook.
If i have another spreadsheet open I found I can do this, However not when
the 2nd (register/record) work book is closed. I tried recording a macro
whcih included opening the destination work book, but this would not run when
I trialled it.
Can I do this?
Alternatively, can i program excel in such a way that every time I open
workbook A, workbook B also automatically opens so that I can write to work
book B as a register/record?
Huge thanks for your help, if anyone does know, I am a begininer so please
be very specific. I don't know how to "write macro codes" as such, I have
just been recording macros the easy way.



Dave Peterson

You recorded macro should work ok.

Is there a chance that you didn't allow macros to run when you reopened the

If you allowed macros to run, then you'll have to explain what didn't work in
greater detail.

And if you get your recorded macro to work, then you can rename it to Auto_Open
and that will run when your workbook opens (if you allow macros to run).

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:

David McRitchie has an intro to macros:

Ron de Bruin's intro to macros:

(General, Regular and Standard modules all describe the same thing.)

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question