Shaxda tusmada
Tani waa cashar gaaban oo tallaabo-tallaabo ah oo loogu talagalay bilowgayaasha tusinaya sida loogu daro koodhka VBA-ga (Visual Basic for Applications code) buuggaaga shaqada ee Excel oo socodsii makrokan si aad u xalliso hawlahaaga xaashida.
Dadka intooda badan way i jecel yihiin adiguna ma tihid gurus Microsoft Office dhabta ah. Marka, waxaa laga yaabaa inaan ogaanno dhammaan waxyaabaha gaarka ah ee wacitaanka kan ama doorashadaas, mana sheegi karno farqiga u dhexeeya xawaaraha fulinta VBA ee noocyada kala duwan ee Excel. Waxaan u isticmaalnaa Excel qalab ahaan si aan u socodsiino xogtayada la dabaqay.
Ka soo qaad inaad u baahan tahay inaad xogtaada si uun u beddesho. Wax badan baad google galisay oo waxaad heshay VBA macro kaas oo xaliya hawshaada. Si kastaba ha ahaatee, aqoontaada VBA waxay ka tagtaa wax badan oo la rabo. Dareen xor u ah inaad barato tilmaan-tallaabo tallaabo-tallaabo ah si aad u awooddo inaad isticmaasho koodka aad heshay:
- >
Geli code VBA Buugga Shaqada ee Excel
>Tusaale ahaan, waxaanu Waxaad isticmaali doontaa VBA macro si aad uga saarto nasashada xariiqda xaashida shaqada ee hadda.- Ku fur buuggaaga shaqada Excel.
- Riix Alt + F11 si aad u furto Visual Basic Editor (VBE).
11>
> > Midig ku dhufo magaca buuggaaga shaqada ee shayga " Project-VBAProject " (oo ku yaal geeska bidix ee sare ee daaqada editor) oo dooro Geli -> Module laga bilaabo liiska macnaha guud. - 14>Talo: dedeji fulinta makro
Haddii koodka kaagaVBA macro kuma jiraan sadarradan soo socda bilowga:
>> Codsiga.ScreenUpdating = Been
> Codsiga khadadka si aad u hesho macro-gaagu si dhakhso leh ugu shaqeeyo (fiiri shaashadaha sare):- >> Ilaa bilawga koodka, ka dib dhammaan khadadka koodka ee ka bilaabma Dim (haddii ay jiraan maya " Dim " khadadka, ka dibna ku dar isla markiiba Sub line):
Application.ScreenUpdating = False
Codsiga. Xisaabinta = xlCalculationManual
> 9> Ilaa koodka, ka hor Dhammaadka Sub :Application.ScreenUpdating = True
Kadib markii koodka la fuliyo, wax walba waa la shidayaa. Natiijo ahaan, waxqabadka ayaa laga kordhiyaa 10% ilaa 500% (ha, makro wuxuu u shaqeeyaa 5 jeer dhakhso ah haddii uu si joogto ah u maamulo waxa ku jira unugyada).
- Buuggaaga shaqada u keydi sidii " Buug-shaqeedka macro-enabled ee Excel ".
Riix Crl + S , dabadeed dhagsii " Maya " ee ku dhex jira " Tilmaamaha soo socda laguma kaydin karo buug-shaqeedka bilaa-la'aanta ah " wada hadalka digniinta.
<0 >Wadaha " Save as " ayaa furmi doona. Dooro " Excel macro-enabled workbook " ka " Save as type " liiska hoos-hoosaadka oo dhagsii badhanka Save .
>19>
>Riix Alt + Q si aad u xidhoDaaqadda tifaftirka oo dib ugu laabo buugaag shaqo
>
> > Nuqul ka soo guuri koodka VBA-da (laga soo bilaabo bogga-webeedka iwm.) oo ku dheji muraayadda midig ee tifaftiraha VBA (" Module1 " daaqada).
Sida loo maamulo VBA macros ee Excel
Marka aad rabto inaad socodsiiso code VBA ee aad ku dartay sida lagu sharaxay qaybta sare: taabo Alt+F8 si aad u furto wada hadalka " Macro "
ka bacdi ka dooro macro-ga la doonayo liiska "Macro Name" oo dhagsii badhanka "Run".
21>