LibreOffice 24.8 Help
អ្នកអាចអនុវត្តអនុគមន៍ដែលកំណត់ដោយអ្នកប្រើក្នុង LibreOffice Calc តាមវិធីដូចខាងក្រោម ៖
អ្នកអាចកំណត់អនុគមន៍ផ្ទាល់ខ្លួនរបស់អ្នកដោយប្រើ Basic-IDE ។ វិធីសាស្ត្រនេះទាមទារចំណេះដឹងមូលដ្ឋានខាងផ្នែកសរសេរកម្មវិធី ។
អ្នកអាចសរសេរកម្មវិធីអនុគមន៍ ដូចជា កម្មវិធីបន្ថែម ។ វិធីសាស្ត្រនេះទាមទារឲ្យមានចំណេះដឹងខ្ពស់ខាងផ្នែកសរសេរកម្មវិធី ។
Choose
.You will now see the Basic IDE.
In the Object Catalog window, double-click on the module where you want to store your macro.
Enter the function code. In this example, we define a VOL(a; b; c) function that calculates the volume of a rectangular solid with side lengths a, b and c:
Function VOL(a, b, c)
VOL = a*b*c
End Function
បិទបង្អួច Basic-IDE ។
Your function is automatically saved in the selected module and is now available. If you apply the function in a Calc document that is to be used on another computer, you can copy the function to the Calc document as described in the next section.
ក្នុងដំណាក់កាលទី 2 នៃ "ការកំណត់អនុគមន៍មួយដោយប្រើ LibreOffice Basic" ក្នុងប្រអប់ ម៉ាក្រូ អ្នកបានចុច កែសម្រួល ។ តាមលំនាំដើម ក្នុងវាល ម៉ាក្រូពី ម៉ូឌុល ម៉ាក្រូរបស់ខ្ញុំ - ស្តង់ដារ - ម៉ូឌុល ១ ត្រូវបានជ្រើស ។ បណ្ណាល័យ ស្តង់ដារ មានក្នុងថតអ្នកប្រើរបស់អ្នក ។
បើអ្នកចង់ចម្លងអនុគមន៍ដែលកំណត់ដោយអ្នកប្រើទៅឯកសារ Calc មួយ ៖
Choose
.ក្នុង ម៉ាក្រូ ពី វាល ជ្រើស ម៉ាក្រូរបស់ខ្ញុំ - ស្តង់ដារ - ម៉ូឌុល ១ និងចុច កែសម្រួល ។
ក្នុង Basic-IDE ជ្រើសប្រភពនៃអនុគមន៍ដែលកំណត់ដោយអ្នកប្រើរបស់អ្នក និងចម្លងវាទៅក្តារតម្បៀតខ្ទាស់ ។
បិទ Basic-IDE ។
Choose
.ក្នុង ម៉ាក្រូ ពី វាល ជ្រើស (ឈ្មោះរបស់ឯកសារ Calc) - ស្តង់ដារ - ម៉ូឌុល ១ ។ ចុច កែសម្រួល។
បិទភ្ជាប់មាតិកាក្តារតម្បៀតខ្ទាស់ក្នុង Basic-IDE នៃឯកសារ ។
Once you have defined the function VOL(a; b; c) in the Basic-IDE, you can apply it the same way as the built-in functions of LibreOffice Calc.
Open a Calc document and enter numbers for the function parameters a, b and c in cells A1, B1, and C1.
ដាក់ទស្សន៍ទ្រនិចក្នុងក្រឡាផ្សេងទៀត និងបញ្ចូលដូចខាងក្រោម ៖
=VOL(A1;B1;C1)
អនុគមន៍ត្រូវបានវាយតម្លៃ ហើយអ្នកនឹងឃើញលទ្ធផលក្នុងក្រឡាដែលបានជ្រើស ។