PC Review


Reply
Thread Tools Rate Thread

How can I reduce repetative code

 
 
leerem
Guest
Posts: n/a
 
      3rd Aug 2008
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.
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      3rd Aug 2008
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.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I reduce repetative code leerem Microsoft Excel Misc 4 3rd Aug 2008 12:20 PM
Tag your it! help with mundane repetative code... DawnTreader Microsoft Access Form Coding 1 1st Aug 2008 12:48 AM
A lot of repetative code =?Utf-8?B?U2VuYWQ=?= Microsoft Access Form Coding 2 26th Jun 2004 07:40 PM
Re: Include Repetative Code Tom Shelton Microsoft VB .NET 0 25th May 2004 06:40 PM
RE: Include Repetative Code Craig Vick [MSFT] Microsoft VB .NET 1 25th May 2004 05:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:41 AM.