Hi All,
i'm very new to VB, trying to teach my self, have some experience in C++.
there must be an easier way for me to write the following?
Please Login or Register to view this content.
Hi All,
i'm very new to VB, trying to teach my self, have some experience in C++.
there must be an easier way for me to write the following?
Please Login or Register to view this content.
Last edited by JBeaucaire; 09-04-2012 at 07:33 AM. Reason: Added code tags, as per forum rules. Don't forget!
I infer that the only acceptable value is an even number from 2 to 52?
Please Login or Register to view this content.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
assuming you can only have even pay periods less than or equal to 52
Please Login or Register to view this content.
Josie
if at first you don't succeed try doing it the way your wife told you to
Hey chaps , for some reason when I come to this pay I get a proxy or sign in request for joymotors.in, could be issue on my end but I have tried my work desktop and now my HTC on my mobile network, same result.
Regarding both responses many thanks, works very well and has tidied up my userform code no end! Thanks again, have added to reputation.
Dave
Ireland
@ unreal_event_horizon
Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
Thanks.
Anytime you find yourself doing/coding anything repititiously and find yourself looking at long blocks of code identical except for small iteration changes, post back to the forum with those and people here can help you further learn ways to turn repititious code into shorter iterating code with FOR/NEXT loops.
Other times, the repititious code AND the iterative code is not needed, another set of eyes might offer a single "onepass" method of accomplishing all the iterations in a single set of codes.
Hello unreal_event_horizon,
Even though this is solved, here is away in VBA very similar to C++.
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Leith, I think the second case statement needs to be amended to reference only the odd numbers from 39 to 51.
Hello Jerry,
You're right. I missed that they were all odd. Here is the change...
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks