Cov ntaub ntawv xaiv dab tsi hauv Visual Basic?
Cov ntaub ntawv xaiv dab tsi hauv Visual Basic?

Video: Cov ntaub ntawv xaiv dab tsi hauv Visual Basic?

Video: Cov ntaub ntawv xaiv dab tsi hauv Visual Basic?
Video: Leng Yang - Yog Vim Dab Tsi (Official Full Song | Nkauj Tawm Tshiab) 2020/05/24 2024, Kaum ib hlis
Anonim

A Xaiv Case nqe lus tso cai rau qhov sib txawv los sib tw rau kev sib npaug ntawm cov npe ntawm cov txiaj ntsig. Txhua tus nqi yog hu ua cas , thiab qhov sib txawv ntawm qhov hloov pauv tau raug kuaj xyuas foreach xaiv rooj plaub.

Hauv qhov no, nqe lus kawg ntawm kev xaiv rooj plaub yog dab tsi?

Yog tias testexpression phim cov expressionlist txuam nrog a Case clause, ua nqe lus block tom qab ntawd Case clause yog executed mus rau tom ntej Case clause, los yog rau qhov kawg, mus txog Xaus Xaiv . Control cespasses rau lub nqe lus raws li EndSelect.

Ib yam li ntawd, cov lus hloov pauv ua haujlwm li cas? Lub cev ntawm a hloov nqe lus yog lub npe hu ua a hloov thaiv. A nqe lus hauv hloov blockcan tau sau nrog ib lossis ntau dua cas los yog default labels. Cov hloov nqe lus ntsuam xyuas nws cov lus qhia, ces executes tag nrho nqe lus uas ua raws li kev sib tw cas daim ntawv lo.

Tsuas yog li ntawd, dab tsi yog qhov kev nthuav qhia?

CAS cov lus qhia pub ib kev qhia los xaiv raws li qhov kev ntsuam xyuas ntawm ib lossis ntau qhov xwm txheej. cas - kev qhia.

Koj puas tuaj yeem siv CASE nqe lus hauv kev nkag mus?

Lub Microsoft Access Case nqe lus tuaj yeem tsuas yog beused hauv VBA code. Nws muaj qhov ua haujlwm ntawm IF-THEN-ELSE nqe lus.

Pom zoo: