It's goingtobe a greattraining, solet's getstarted.
素晴らしいトレーニングになるから、始めよう。
Just a notebefore, I docreatetheseVBAbasictrainingseachandeverySaturday, alongwithTuesdaycompleteapplicationdevelopment, somakesureyoudogetsubscribedandalsoturnonthenotificationicon.
When I firststarteddeveloping, I didn't knowhowtonamethesemodules.
開発を始めた当初は、これらのモジュールにどのような名前をつければいいのかわからなかった。
I wouldhavemodulesone, two, three, soifweinsertanotheronehere, andsonowwehavemoduletwo, and I didn't knowwhatwasinsideeach.
モジュール1、2、3があって、ここにもう1つ挿入すると、モジュール2になる。
I wouldhavetoclickoneachjusttoknow, sothefirstthingyouwanttodo, especiallyifyou'regoingtobedeveloping a largerapplicationwith a lotofmodules, istonameyourmodule, andtodothat, youcangointothepropertieshere, orclick F4, andit's goingtolaunchthisproperties.
Alsowhenyou'renaming, wewanttomakesurethatweuse a combinationofcapitallettersandsmallerletters, solet's say I'lldocustomer, somethinglikeaddnew, andthenmaybewe'lldocustomer, andthenwe'lldosaveorupdate.
Nowoneofthethingsthat I like, let's dothesubfirst, nowwhen I wanttoaddthisnewcustomersomewhereelse, andif I'm inanothermodulehere, and I writesubschedule, andthenaddnew, somaybe I wanttoaddthatnewcustomer, and a goodwayif I wanttorememberit, I don't wanttonecessarilylookover, usingthecombinationoflowercaseanduppercaseisgoingtobereallyhelpful, becauseithelpsusletusknowwhenwehavetherightone.
Soif I typeinaddnew, youseehowitautomaticallygoestothecapitalletters, thepropernamehere.
新規追加と入力すると、自動的に大文字の固有名詞になるのがわかるだろう。
However, if I getanythingwronginsidethename, somethinglikethis, and I goover, lookhowitdoesn't change, that's goingtotellmerightthere, I'vegotsomethingwrongwiththename, soitkindofhelpsus, wedon't alwayshavetolookback, sothattellsmerightthere, becauseitdidn't gotocapitalletters, I knowthat I mighthaveanissuewiththemacro, sothatkindofavoidserrors, andmakesthingsreallyclear.
And I thinkthat's a reallycriticalcomponentbecausewhenwe'relookingatourcodeorsomebodyelseislookingatourcode, orevenifwe'relookingatourowncode, a fewyearslater, wewantittobevery, veryeasy.
Ifitthengoestotheupper, I knowthat I'vegottherightvariable.
もし、それが上に行けば、私は正しい変数を持っていることを知る。
Soit's a greatway.
だから、素晴らしい方法なんだ。
Soif I getitwrong, it's goingtotellmerightawaythatithasn't changedtheuppercasehere.
だから、もし間違ったら、大文字を変えていないことをすぐに教えてくれる。
So I knowthatthere's somethingwrongwiththevariable.
だから、この変数に何か問題があることは分かっている。
Sonotonlyusingcorrectnames, butusing a combinationofupperandlowercasetohelpusquicklyunderstandthatmeansaswe'retypingthecode, weknowthatwe'vegotanincorrectvariableandthathappensallthetime.
Sowewanttousenotonlynamingthecorrectnamesandclearnames, butusing a combinationofupperandlowercaseorusingsometypeof a propernamesothatwecanquicklyseewhenwetypeincorrectvariables.
Anotherthingwewanttomakesureof, andlet's justsay, forexample, wehaveapplicationwherewe'vegot, let's say a customerlisthereandwegointotheformulasnamemanager.
Andlike I said, evenifnobodyisgoingtoseeyourcode, itishelpfulforyouandyourselfifyoucomebacktoyourcodeover a periodoftimetounderstandexactlywhatthecodeisdoingandwillhelpyoufinderrorsandunderstandabouttheapplicationdevelopment.
Anotherwaytoautomateandspeedupyourcodedevelopmentandalsoincreaseaccuracyistouseanautomator, a codeautomator, orsomethinglikeAutoHotKeythatautomaticallyallowsyoutotypeincode.