-
WSNight
AskWoody LoungerThanks for the tips I ended up figuring it out. When I get home I will post the code if needed.
-
WSNight
AskWoody LoungerNarrowed the problem to one line. Some where in the Do Loop statement it is messing up. WHen I get the number calc it is saying something like 11984 for the number of years to double. Ok so then if I have the loop statement like this
Do While balance < (balance * 2)
balance = (r + 1) * balance
numYearsDoub += 1
Loopwhere is it wrong? I know it is the Do While balance < (balance * 2) but I can't figure out why that is the problem. Any help is appreciated.
Here is updated code.
Private Sub btnDetermine_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDetermine.Click 'Declare Variables Dim balance, r, amount As Double Dim numYearsMil, numYearsDoub As Integer 'Get initial value of balance, and rate from a textbox balance = CDbl(txtAmount.Text) amount = CDbl(txtAmount.Text) r = CDbl(txtRate.Text) Do While amount < amount * 2 amount = (1 + r) * amount numYearsDoub += 1 Loop 'Loop determines the number of years it will take to double your money Do While balance < 1000000 balance = (1 + r) * balance numYearsMil += 1 Loop 'Prints the number of years it takes to become a millionare txtDouble.Text = "In " & numYearsDoub & " years you will double your money." txtMillion.Text = "In " & numYearsMil & " years you will have a million dollars." End Sub
-
WSNight
AskWoody LoungerNarrowed the problem to one line. Some where in the Do Loop statement it is messing up. WHen I get the number calc it is saying something like 11984 for the number of years to double. Ok so then if I have the loop statement like this
Do While balance < (balance * 2)
balance = (r + 1) * balance
numYearsDoub += 1
Loopwhere is it wrong? I know it is the Do While balance < (balance * 2) but I can't figure out why that is the problem. Any help is appreciated.
Here is updated code.
Private Sub btnDetermine_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDetermine.Click 'Declare Variables Dim balance, r, amount As Double Dim numYearsMil, numYearsDoub As Integer 'Get initial value of balance, and rate from a textbox balance = CDbl(txtAmount.Text) amount = CDbl(txtAmount.Text) r = CDbl(txtRate.Text) Do While amount < amount * 2 amount = (1 + r) * amount numYearsDoub += 1 Loop 'Loop determines the number of years it will take to double your money Do While balance < 1000000 balance = (1 + r) * balance numYearsMil += 1 Loop 'Prints the number of years it takes to become a millionare txtDouble.Text = "In " & numYearsDoub & " years you will double your money." txtMillion.Text = "In " & numYearsMil & " years you will have a million dollars." End Sub
-
WSNight
AskWoody LoungerOk I’ve narrowed down the problem. It is in the first Do Loop. For some reason the doubleing money is holding up the system. Without that I can easily get the number of years it takes to make a million. But if that loop is there then it bogs up the system and gives me odd numbers. I don’t know what to do with it. Oh I took out the = sign in the first loop and it stoped freezing on me.
-
WSNight
AskWoody LoungerOk I’ve narrowed down the problem. It is in the first Do Loop. For some reason the doubleing money is holding up the system. Without that I can easily get the number of years it takes to make a million. But if that loop is there then it bogs up the system and gives me odd numbers. I don’t know what to do with it. Oh I took out the = sign in the first loop and it stoped freezing on me.
-
WSNight
AskWoody LoungerAn assignment of sorts yes. For me not as much as the kids in my class. I had forgoten all about using MOD for some reason or another at first until I went back through old work where I needed to know that and before the IsLeapYear was available to use. I must say that .NET is one of the greatest things though. And Howard is quite right. We are all always students in the world of programming. Can’t know it all though there are people out there that know so much it seems you’ll never catch them, but those are our programming vets who have been doing it for so long that is is almost second nature. I can say those guys have helped me out more than I could ever hope. Thanks for the help though guys. If it weren’t for all of you we could all be lost.
-
WSNight
AskWoody LoungerAn assignment of sorts yes. For me not as much as the kids in my class. I had forgoten all about using MOD for some reason or another at first until I went back through old work where I needed to know that and before the IsLeapYear was available to use. I must say that .NET is one of the greatest things though. And Howard is quite right. We are all always students in the world of programming. Can’t know it all though there are people out there that know so much it seems you’ll never catch them, but those are our programming vets who have been doing it for so long that is is almost second nature. I can say those guys have helped me out more than I could ever hope. Thanks for the help though guys. If it weren’t for all of you we could all be lost.
-
WSNight
AskWoody LoungerYou are quite right. I tend to find more information in the search which will prevent me from posting. Of course at times there are so many posts to run through that it is hard so if I post a thread I may be able to get a point to the right one.
-
WSNight
AskWoody LoungerI like to follow up. Allows me to thank those that helped me out or gave me direction of any kind. Always appreciated. Besides when I help it’s good to know that it got solved.
-
WSNight
AskWoody LoungerI like to follow up. Allows me to thank those that helped me out or gave me direction of any kind. Always appreciated. Besides when I help it’s good to know that it got solved.
-
WSNight
AskWoody LoungerAh but I wasn’t allowed to use the IsLeapYear check. Had to do it the old fasion way. I remembered how to after a little while. Just a simple if then statement.
If ((year Mod 4 = 0) And (year Mod 100 0) Or (year Mod 400 = 0)) Then
So it all worked out. Thanks for the input.
-
WSNight
AskWoody LoungerAh but I wasn’t allowed to use the IsLeapYear check. Had to do it the old fasion way. I remembered how to after a little while. Just a simple if then statement.
If ((year Mod 4 = 0) And (year Mod 100 0) Or (year Mod 400 = 0)) Then
So it all worked out. Thanks for the input.
-
WSNight
AskWoody LoungerWell I figured it out. All I had to do was refresh in the bios after I reformated. At least when I went into the BIOS and once the computer restarted the drive was back to where I could see and access it. Thanks for all the help.
-
WSNight
AskWoody LoungerWell I figured it out. All I had to do was refresh in the bios after I reformated. At least when I went into the BIOS and once the computer restarted the drive was back to where I could see and access it. Thanks for all the help.
-
WSNight
AskWoody LoungerOk well my frist statment was probably a jumble of frustrating words. Like I said I have been working on this for a while now. Anyway let me try to rephrase this a bit.
Ok so I have 2 harddrives that I need to have connected for the various use they are in. Well the problem is that I have my 4 IDE’s used up by 4 other hardware components. A DVD-Rom, CD-Writer, Zip Drive, and my Master Harddrive. Now what I need to be able to do is set up the second harddrive without using the IDE porst seeing as they are all used. With the IDE’s I could pretty much just plug it in and hey there it goes and it’s all good right. Well I need that Zip drive hooked up since I have to hand things in to various professors on disks and a zip disk holds what I need it to (Jump drive’s are a bit expensive to have to many of those). So what do I do? I set up a RAID controller to identify the other Harddisk. I am not actually creating a RAID as most would. I am using the RAID to identify that the other HDD is there so that I can access it. Problem is that it for some reason won’t let me. I know it’s possible because before when I first got the computer it was all working and it was set up in that fasion. Hope this is a bit better of an explination of what I am trying to do.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
7 hours, 17 minutes ago -
AI slop
by
Susan Bradley
6 hours, 28 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
8 hours, 34 minutes ago -
Two blank icons
by
CR2
15 hours, 3 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
17 hours, 27 minutes ago -
End of 10
by
Alex5723
20 hours, 8 minutes ago -
End Of 10 : Move to Linux
by
Alex5723
20 hours, 37 minutes ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
17 hours, 6 minutes ago -
test post
by
gtd12345
1 day, 2 hours ago -
Privacy and the Real ID
by
Susan Bradley
16 hours, 16 minutes ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
8 hours, 23 minutes ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
1 day, 6 hours ago -
Upgrading from Win 10
by
WSjcgc50
7 hours, 52 minutes ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
5 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
1 day, 22 hours ago -
The story of Windows Longhorn
by
Cybertooth
1 day, 9 hours ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
2 days ago -
Are manuals extinct?
by
Susan Bradley
11 hours, 36 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
2 days, 9 hours ago -
Network Issue
by
Casey H
1 day, 20 hours ago -
Fedora Linux is now an official WSL distro
by
Alex5723
2 days, 21 hours ago -
May 2025 Office non-Security updates
by
PKCano
2 days, 21 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
2 days, 23 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
2 days ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
3 days, 1 hour ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
3 days, 1 hour ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
3 days, 9 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
1 hour, 5 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
3 days, 20 hours ago -
How much I spent on the Mac mini
by
Will Fastie
1 day, 3 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.