![]() |
How can I reduce repetative code
i have set up a userform with OptionButton for all the weeks of the year to
save data too, with a command Button with If OptionButton1=true then -and code- Instead of having to repeat the same steps over and over again eg: open new workbook / name new workbook / copy data to new workbook /save workbook / close workbook. My question: Can I set up a variable for week Number and associate that into the file name, therby saveing approx 40 lines of code for each week no. |
How can I reduce repetative code
Repetative posting is as bad a practice as repetative code, have a look in
your other thread. Mike "leerem" wrote: i have set up a userform with OptionButton for all the weeks of the year to save data too, with a command Button with If OptionButton1=true then -and code- Instead of having to repeat the same steps over and over again eg: open new workbook / name new workbook / copy data to new workbook /save workbook / close workbook. My question: Can I set up a variable for week Number and associate that into the file name, therby saveing approx 40 lines of code for each week no. |
All times are GMT +1. The time now is 04:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com