If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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. Thanks |
#2
|
|||
|
|||
How do I write to a closed work book as a "register"
You recorded macro should work ok.
Is there a chance that you didn't allow macros to run when you reopened the workbook? 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 he http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Kiwifella wrote: 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. Thanks -- Dave Peterson |
Thread Tools | |
Display Modes | |
|
|