Cov txheej txheem:

VBA Code kom Xauv Lub Xauv Excel Ntawv: 4 Cov Kauj Ruam
VBA Code kom Xauv Lub Xauv Excel Ntawv: 4 Cov Kauj Ruam

Video: VBA Code kom Xauv Lub Xauv Excel Ntawv: 4 Cov Kauj Ruam

Video: VBA Code kom Xauv Lub Xauv Excel Ntawv: 4 Cov Kauj Ruam
Video: Qhia Khib Laib Nyiaj Hli 2024, Kaum ib hlis
Anonim
VBA Code txhawm rau Xauv Daim Ntawv Xauv Excel
VBA Code txhawm rau Xauv Daim Ntawv Xauv Excel
VBA Code txhawm rau Xauv Daim Ntawv Xauv Excel
VBA Code txhawm rau Xauv Daim Ntawv Xauv Excel

Yog tias koj tau hnov qab lo lus zais rau ib qho ntawm koj daim ntawv ua haujlwm zoo koj paub tias yuav ua rau muaj kev ntxhov siab li cas. Cov cai siv hauv cov lus qhia no yog ib qho uas yooj yim tshaj plaws uas kuv tau pom. Nws yuav tsim cov lej siv tau uas yuav qhib koj daim ntawv tiv thaiv. Kuv tsis tuaj yeem siv credit rau tus lej raws li kuv tsuas pom nws nyob rau lub sijhawm xav tau (thiab kuv tsis tuaj yeem pom qhov chaw nyob ntxiv lawm) … sooo Kuv yuav tsis muaj kev pab ntau yog tias nws tsis ua haujlwm rau koj tab sis kuv tau tau ua tiav nrog nws thiab xav tias kuv yuav qhia.

Kauj ruam 1: Qhib VBA

Qhib VBA
Qhib VBA

Qhib daim ntawv ua haujlwm koj tsis nco qab koj tus lej password. Use Alt+F11 txhawm rau nkag mus rau tus khoos phis tawj macro. Once hauv VBA ob npaug nias rau ntawm daim ntawv koj xav tau qhib los ntawm cov ntawv qhia zaub mov nyob rau sab laug Qhov no yuav qhib cov lus tshaj tawm dav dav nplooj ntawv.

Kauj Ruam 2: Txiav thiab Muab Tshuaj txhuam Cov Cai

Txiav thiab Muab Tshuaj txhuam Cov Cai Txiav Txim
Txiav thiab Muab Tshuaj txhuam Cov Cai Txiav Txim

Ntxig cov cai hauv qab no hauv nplooj ntawv tshaj tawm dav dav koj tau qhib. Koj yuav tsum tsis txhob hloov dab tsi, daim ntawv npe thiab lwm yam … Tsuas yog txiav thiab muab tshuaj txhuam. Raws li IntegerDim l Raws Li Integer, m Raws Li Integer, n Raws Li Integer Dim i1 Raws Li Integer, i2 Raws Li Integer, i3 Raws Li Integer Dim i4 Raws Li Integer, i5 Raws Li Integer, i6 Raws Li Integer Ntawm Qhov Ua Tsis Tau Rov Qab Mus Ntxiv Rau i = 65 Rau 66: Rau j = 65 txog 66: Rau k = 65 txog 66 Rau l = 65 txog 66: Rau m = 65 txog 66: Rau i1 = 65 txog 66 Rau i2 = 65 txog 66: Rau i3 = 65 txog 66: Rau i4 = 65 Rau 66 Rau i5 = 65 Rau 66: Rau i6 = 65 Rau 66: Rau n = 32 Rau 126 ActiveSheet. Unprotect Chr (i) & Chr (j) & Chr (k) & _ Chr (l) & Chr (m) & Chr (i1) & Chr (i2) & Chr (i3) & _Chr (i4) & Chr (i5) & Chr (i6) & Chr (n) Yog ActiveSheet. ProtectContents = Cuav ces MsgBox "Ib lo lus zais siv tau yog" & Chr (i) & Chr (j) & _ Chr (k) & Chr (l) & Chr (m) & Chr (i1) & Chr (i2) & _ Chr (i3) & Chr (i4) & Chr (i5)) & Chr (i6) & Chr (n) Tawm Sub End Yog tias Tom ntej: Tom ntej: Tom ntej: Tom ntej: Tom ntej: Tom ntej: Tom ntej: Tom ntej: Tom ntej: Tom ntej: Next kawg Sub_

Kauj ruam 3: Khiav Macro

Khiav Macro
Khiav Macro

Thaum cov cai tau ntxiv khiav Macro los ntawm kev xaiv Khiav los ntawm cov ntawv qhia zaub mov bar nyob rau sab saum toj ntawm VBA tus khoos phis tawj lossis nias yooj yim F5

Kauj Ruam 4: Siv Cov Cai Tsim

Siv Cov Cai Tsim
Siv Cov Cai Tsim
Siv Cov Cai Tsim
Siv Cov Cai Tsim
Siv Cov Cai Tsim
Siv Cov Cai Tsim

Macro yuav xa koj rov mus rau daim ntawv haujlwm uas koj xav tiv thaiv. Lub thawv ceeb toom ceeb toom yuav tshwm nrog tus lej siv tau. Hauv Kev Ntsuam Xyuas cov ntawv qhia tab nyem Unprotect sheet. Enter the generated code as the password and your done. Koj daim ntawv yuav tsum tau qhib!

Pom zoo: