Begginnerdev commented: Nice code snippet. +8
adil.ghori commented: I did the other one, check the next post +0
adil.ghori commented: thank you +0
You are very welcome, please don't forget to mark this thread as solved.
Hi Mireya B.,
Try the following workbook and let me know if it more suits your requirements. There were chances of double entries because if the user hit enter button more than once the same data in the form would be entered twice (or however many times that button would be accidentally pressed. I've added a bit of code to remove the fields after that button is pressed, just as a precaution. At any rate, I think it is working properly now.
Hi Mireya, can you zip your file and upload it? I can mess around with your code but I cannot test it at all which makes it difficult to accurately tell how to fix the errors. I'll try if I have to but it would be so much easier on me to work with your file.
I agree wit pritaeas, you need guidance, not someone to solve this for you. A dm to me does not inspire me to solve this for you. Plus, you have provided no consistency with regards to what you want. You have shown both business statements and student type statements.
Plus, pritaeas has asked you on more than one occasion to state your errors but you still haven't. Please, help us to help you.
I'm always in favour of explicitly setting ranges and cells to the worksheets they are supposed to update. When you just use Cells(blah), if the worksheet changes then the new worksheet will change. It also allows for intellisense, which I really like and find very convenient.
Now, I don't know if this corrects your issues because I cannot test this and as Begginnerdev points out, the problem might be with your data so it's tought to say but let me know if the following works or not
Private Sub OKButton_Click()
Dim ws3 As Worksheet, ws4 As Worksheet
Dim emptyRow As Long
Dim x As Long
Set ws3 = Sheets(3)
Set ws4 = Sheets(4)
If UnplannedCategoryComboBox.Value = "Anti-Surge Valve System (AVS)" Then
emptyRow = ws3.Cells(ws3.Rows.Count, 1).End(xlUp).Offset(1, 0).Row
With ws3
.Cells(emptyRow, 1).Value = UnplannedDateTextBox.Value
.Cells(emptyRow, 2).Value = UnplannedMonthComboBox.Value
End With
For x = 2 To 9
If UnplannedYearComboBox.Value = "200" & x Then ws3.Cells(emptyRow, x + 1).Value = UnplannedDurationTextBox.Value
Next x
End If
ws3.Cells(emptyRow, 11).Value = UnplannedCauseFailureTextBox.Value
If UnplannedCategoryComboBox.Value = "Centrifugal Gas Compressor (GC)" Then
emptyRow = ws4.Cells(ws4.Rows.Count, 1).End(xlUp).Offset(1, 0).Row
With ws4
.Cells(emptyRow, 1).Value = UnplannedDateTextBox.Value
.Cells(emptyRow, 2).Value = UnplannedMonthComboBox.Value
End With
For x = 2 To 9
If UnplannedYearComboBox.Value = "200" & x Then ws4.Cells(emptyRow, x + 1).Value = UnplannedDurationTextBox.Value
Next x
ws4.Cells(emptyRow, 11).Value = UnplannedCauseFailureTextBox.Value
End If
End Sub
Sorry, I can't do this right now for you. I encourage you to try again though and post what you've done. In my opinion, that's the best way for you to learn.
This comes down to interpretation but I'm going to throw in my 2 pennies.
0 or 1 candidates takes 0 or more sessions and 0 or more sessions creates 0 or 1 courses <--I'm not sure about this. For example, in order to have a session, you'd need at least 1 candidate, not 0. Does 0 or more sessions create 0 or 1 courses? Not really sure about this one either. I'm also not sure how 1 and only 1 course teaches 0 or many learned? I guess the naming convention might be throwing me off here. Anyways, that's a start in my opinion.
where's the student table? That's an important one.
Looks like good practice for you and your studies/assignment. Good for you for doing this on your own!
In my university they started us off by learning Java. I would suggest that too and am of the opinion that once you learn one language, others become easier to learn. Syntaxes may change a bit between languages but they tend to function the same. For example, looping is a very generic topic but important in (probably) all languages. As for resources, try here. Books help too but there are many and I can't be specific for you at the moment.
I thought JMonkey had game examples with code that you can look at?!
DropBox has admitted that unless you encrypt your files before uploading they can be accessed by the authorities upon request.
I didn't know that but I'm happy that I do now. Time to take over the world!
Just add a counter of type int and add it to both the if and else if statements. Once in place, add a print line to your final "else" when the user gets it right which will output the counter. I would offer you code but this looks like an assignment and we get our hands slapped when we post solutions to assignments.
Here's the last print lines, you should be able to figure out the rest I think
System.out.println ("good! you guessed correct");
counter +=1;
System.out.println("It took you " + counter + " tries.");
Never mind my last post, I've delved deeper into the site and found more discussions and whatnot. I haven't been a member here long but I am loyal to this site so I say down with the enemy site! LoL.
Why would they do that? Was it to make their site look like it's established? I find it interesting to look at the "Members" count is over 10,000, "Discussions" and "Messages" are over 12,000 but yet when you actually look at the forums part there are just over 300 discussions and messages.
That's sneaky I wot! I'm just happy that the site doesn't have my personal info. They can't get that can they?
33 cuz that's my number :)
No doubt but it was an instant annoyance factor for me. I back everything up on my pc from my phone once per week so Dropbox or similar isn't necessary for me.
I don't like the way Dropbox automatically and instantly takes things like pics from my phone. I had to uninstall the app because of that. I'm going to wager a guess that Copy probably does the same.
My kids and I have a punching game for yellow vehicles - "Yellow car safety, no punch-back"
We also do the classic "Punch Buggy no punch-back" and "PT Cruiser Bruiser no punch-back".
One day you will blink your eyes and you will be 70
I blinked and I'm going to be 40 this year.
93 I don't like sugar cookies (pucks) either.
I just scored a 9. Because of this crappy low score, I told my co-workers to f-off, through my monitor and the person to my right (he may have died, didn't care to look). When they tried to stop me I blamed Daniweb for my actions because my actions are never my fault. I just apologized to the worker to my right (turns out he's ok). I got my monitor back from him and then through it at him again.
It's a good thing I'm not a psycopath!
Saturday December 15, 1973. Ahh, I remember that like it was yesterday! Oh wait, I'm only remembering yesterday.
Well, since forums like this contain either retired people or workers that run puppy mills (dog f^^^ers), there's probably a few puppies around. LoL, kidding all, just kidding. :)
vinnitro mentions a great site. I reference w3schools for more than just java: they break down SQL quite nicely too.
When I was taking an HTML course at uni I only used notepadd++ and when I play around with html I still use it. I think it is a great editor for these purposes.
I said, "you don't need an actual website to do that". If you are a student then learn everything you can about html, css, and even javascript. JorgeM is right though as there are a number of different GUIs out there where anyone with no knowledge of html and etc is needed but if you want to actually learn about building a website from scratch, I wouldn't recommend that route.
Personally I don't write much html, I use SharePoint's gui to set up our internal website but I understand the basics (and maybe a little more) regarding html, css, and jscript.
Personally, I don't think you should be referencing a book where you already need a website, especially if you are just starting out with learning about it. A good book will have you create your own webpages and you don't need an actual website to do that.
I agree with IIM, Notepad++ is an excellent text editor for a wide range of code writing (Java, HTML, SQL). In saying that, when I work with Java I prefer to use Netbeans but the learning curve of the software was difficult in the beginning. I like they way you can step through each line of code, watch variables, methods, and classes with Netbeans. While taking the Java intro courses in university, we were supposed to use JCreator but I didn't much care for it so I started using Netbeans right away. Others in my class used and still use BlueJ so there is another option.
@rotten69, I think some of the issues pointed out are about moderating the projects thread to make sure that no one is posting regular questions ie: Help me with loops. I'm sure that the existing moderators and admin have their hands full with keeping this site running smoothly and they may not want the extra work involved with this type of sticky. Hence, others would have to step up to make sure that the Projects for Beginners sticky is moderated (by non-moderators).