Add-in Excel (.xll, 64-bit) giúp hàm VBA tự viết trong workbook có được tooltip gợi ý tham số giống hệt hàm gốc của Excel — và tùy chọn gọi được như 1 hàm Excel thật, không cần build lại add-in mỗi khi thêm hàm mới. A 64-bit .xll add-in that gives your own VBA functions the same parameter-hint tooltip as native Excel functions — and optionally makes them callable as real Excel functions, no rebuild needed when you add a new one.
Đây là bản phát hành dạng binary (.xll đã build sẵn). Repo này không chia sẻ mã nguồn Delphi của add-in — chỉ chia sẻ file .xll đã build, file demo, và phần cấu hình XML/VBA mà bạn có thể tự chỉnh sửa để mở rộng hàm của riêng mình. This is a pre-built binary release. This repo does not include the add-in's Delphi source — only the built .xll, a demo workbook, and the XML/VBA config files you edit yourself to add your own functions.
| Tệp tinFile | Mô tảDescription |
|---|---|
ExcelIntellisense64.XLL |
Add-in Excel 64-bit đã build sẵn — không kèm mã nguồn.Pre-built 64-bit Excel add-in — no source included. |
ExcelIntellisense64_Demo.xlsb |
Workbook demo, đã import sẵn modVBAFunctions.bas, dùng để test nhanh không cần tự setup.Demo workbook with modVBAFunctions.bas already imported, for a quick test with zero setup. |
VBAFunctions.xml |
Khai báo danh sách hàm VBA cần có tooltip / đăng ký làm hàm Excel thật. Tự sửa file này để thêm hàm mới, không cần build lại .xll.Declares which VBA functions get a tooltip / get registered as a real Excel function. Edit this to add functions — no .xll rebuild needed. |
modVBAFunctions.bas |
Module VBA mẫu (Cong, Tru, Nhan, Chia + TinhTongCoDieuKien) minh họa cách viết hàm tương thích với add-in.Sample VBA module (Cong, Tru, Nhan, Chia + TinhTongCoDieuKien) showing how to write a compatible function. |
Gõ =TenHam( trong 1 ô, add-in hiện tooltip ngay dưới thanh công thức gồm:
Type =YourFunction( in a cell and a tooltip appears right under the formula bar with:
Toàn bộ nội dung lấy từ VBAFunctions.xml. Tooltip cũng tự hiện lại khi mở file cũ, double-click vào ô có công thức, hoặc nhấn F2.All content comes from VBAFunctions.xml. It also reappears when reopening a saved formula, double-clicking a formula cell, or pressing F2.
Tùy chọn: hàm VBA xuất hiện trong AutoComplete / Insert Function như 1 hàm Excel thật. Khi được gọi, add-in chuyển tiếp sang đúng hàm VBA cùng tên — logic tính toán luôn nằm ở VBA. Optional: your VBA function shows up in AutoComplete / Insert Function like a real Excel function. When called, the add-in forwards the call to the matching VBA function — all logic stays in VBA.
Ngoài việc gõ trực tiếp, tooltip còn phản hồi theo nhiều thao tác khác nhau trên bàn phím và chuột — mỗi thao tác cho kết quả khác nhau, nên biết rõ để tránh nhầm lẫn khi dùng. Besides typing, the tooltip also responds to several other keyboard and mouse actions — each gives a different result, so it's worth knowing them to avoid confusion.
| Thao tácAction | Kết quảResult |
|---|---|
GõType "=Cong" + Tab |
Nếu AutoComplete của Excel đang gợi ý đúng 1 hàm khớp, Tab sẽ tự hoàn tất tên hàm kèm dấu ngoặc mở — tooltip tham số hiện ra ngay lập tức. If Excel's AutoComplete is currently suggesting a single matching function, Tab auto-completes the name with an opening parenthesis — the parameter tooltip appears immediately. |
F2 |
Nhấn F2 trên 1 ô đã có sẵn công thức — add-in đọc lại đúng công thức đã lưu của ô và hiện tooltip ngay, không cần gõ lại từ đầu. Press F2 on a cell that already has a formula — the add-in re-reads the saved formula and shows the tooltip immediately, no retyping needed. |
| Double-click vào ô có công thứcDouble-click a formula cell | Double-click trực tiếp vào 1 ô đang có công thức sẵn (không qua thanh công thức) — hoạt động giống F2: tooltip hiện lại để bạn sửa tiếp. Double-clicking directly on a cell that already has a formula (not via the formula bar) — behaves like F2: the tooltip reappears so you can keep editing. |
| Click chuột vào 1 gợi ýClick a suggestion | Click (hoặc double-click) trực tiếp vào 1 dòng trong danh sách gợi ý AutoComplete — hàm đó được chọn ngay lập tức, tooltip tham số hiện ra y hệt như khi dùng Tab. Clicking (or double-clicking) directly on a row in the AutoComplete suggestion list — that function is selected immediately, and the parameter tooltip appears just like with Tab. |
| Phím mũi tên lên / xuốngUp / Down arrow keys | Chỉ di chuyển vùng tô sáng để xem trước các gợi ý, chưa thực sự chọn — cần Tab, Enter, hoặc click chuột thì tooltip mới hiện đúng hàm đang tô sáng. Only moves the highlight to preview suggestions — it does not commit a selection yet. Press Tab, Enter, or click to actually select and show the tooltip for the highlighted function. |
| Delete, mũi tên trái/phải, Home/End giữa công thứcDelete, Left/Right arrows, Home/End mid-formula | Tooltip tự ẩn thay vì cố hiện tiếp — vì add-in không biết chắc vị trí con trỏ đã đổi ra sao sau các thao tác này, nên chủ động ẩn để tránh hiện sai. Gõ tiếp bình thường sẽ có tooltip trở lại ngay khi khớp đúng tên hàm. The tooltip hides itself rather than risk showing stale info — the add-in can't reliably tell where the cursor ended up after these actions. Keep typing normally and the tooltip returns as soon as a function name matches again. |
Đặt ExcelIntellisense64.XLL và VBAFunctions.xml vào cùng 1 thư mục (bất kỳ đâu, không bắt buộc cấu trúc cố định).
Put ExcelIntellisense64.XLL and VBAFunctions.xml in the same folder (anywhere — no fixed structure required).
Cách 1 — Nạp cố định (khuyến nghị):Option 1 — Permanent (recommended):
Cách 2 — Nạp tạm (chỉ cho session hiện tại):Option 2 — Temporary (this session only):
Double-click trực tiếp vào file .xll khi Excel đang mở, hoặc kéo-thả vào Excel.
Double-click the .xll file while Excel is open, or drag-and-drop it into Excel.
Cách A — Dùng file demo:Option A — Use the demo file:
Mở ExcelIntellisense64_Demo.xlsb, đảm bảo add-in đã nạp, gõ thử =Cong( trong 1 ô.
Open ExcelIntellisense64_Demo.xlsb, make sure the add-in is loaded, try typing =Cong( in a cell.
Cách B — Dùng workbook riêng:Option B — Use your own workbook:
Không cần build lại .xll — chỉ cần sửa VBA và XML.No .xll rebuild — just edit VBA and XML.
Private Function TenHam(A As Double, B As Double) As Double TenHam = A + B End Function
Lưu ý quan trọng:Important:
Private Function, không phải Public. Nếu để Public, Excel sẽ tự động liệt kê hàm này ra làm 1 UDF riêng, gây trùng với hàm add-in đăng ký cùng tên — kết quả là gõ =tenham sẽ thấy 2 dòng trùng nhau. Hàm Private add-in vẫn gọi được bình thường, chỉ Excel không tự liệt kê nó ra ngoài.
Declare it as Private Function, not Public. If left Public, Excel auto-lists it as its own UDF, colliding with the one the add-in registers under the same name — typing =yourfunction then shows 2 duplicate entries. A Private function is still callable by the add-in — Excel just stops auto-listing it.Function (có giá trị trả về), không dùng Sub.Must be a Function (returns a value), not a Sub.<Function name="TenHam"> <Description>Mo ta ngan gon chuc nang cua ham</Description> <Param name="A">Mo ta tham so A</Param> <Param name="B">Mo ta tham so B</Param> </Function>
name của Function và Param không được để trống.name on Function and Param cannot be empty.name="[Dieu_Kien]".Optional parameter: wrap the name in brackets, e.g. name="[Condition]".name chính là tên bạn sẽ gõ trong Excel, và phải khớp đúng tên hàm VBA thật.name is exactly what you type in Excel, and must match the real VBA function name.Sửa xong cả VBA và XML, đóng hoàn toàn Excel rồi mở lại để add-in nạp lại danh sách hàm. After editing both VBA and XML, fully close Excel and reopen it so the add-in reloads the function list.
hàm tối đa được đăng ký làm hàm Excel thật trong 1 lần chạy Excel. Hơn số này vẫn có tooltip, chỉ không gọi được như hàm thật. max functions registered as real Excel functions per Excel session. Beyond that, tooltip still works, just not callable as a real function.
tham số tối đa cho mỗi hàm đăng ký làm hàm Excel thật. Hơn số này sẽ không được đăng ký vì lý do tương tự. max parameters per function registered as a real Excel function — the same fallback applies.
Trong vài trường hợp sửa công thức phức tạp (mũi tên, Delete giữa chuỗi...), tooltip có thể tự ẩn thay vì hiện sai — đây là hành vi có chủ đích. In some complex edit cases (arrow keys, Delete mid-string...) the tooltip hides itself instead of showing something wrong — this is intentional.