fx Excel Intellisense XLL
Delphi · XLL 64-bit · Excel Delphi · XLL 64-bit · Excel

Tooltip IntelliSense cho hàm VBA của bạn IntelliSense tooltips for your VBA functions

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.

Excel 64-bitExcel 64-bit Không cần build lại .xllNo .xll rebuild needed MIT License
01

Nội dung repoWhat's in this repo

Đâ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.
02

Add-in này làm được gìWhat this add-in does

Tooltip IntelliSense cho hàm VBAIntelliSense tooltip for VBA functions

=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:

  • Tên hàm và danh sách tham số — tham số đang gõ được in đậm.Function name and parameter list — the current parameter is bolded.
  • Mô tả của tham số đang gõ.Description of the current parameter.
  • Mô tả tổng quát của hàm.General description of the function.

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.

Cầu nối gọi hàm VBA như hàm Excel thậtBridge: call VBA like a real Excel function

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.

≤ 20 hàm / phiên Excelfunctions / session ≤ 16 tham số / hàmparams / function Range + giá trị thườngplain values
03

Các cách kích hoạt tooltipWays to trigger the tooltip

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
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.
04

Yêu cầu hệ thốngSystem requirements

05

Cài đặtInstallation

1

Chuẩn bị thư mụcPrepare a folder

Đặt ExcelIntellisense64.XLLVBAFunctions.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).

2

Nạp add-in vào ExcelLoad the add-in into Excel

Cách 1 — Nạp cố định (khuyến nghị):Option 1 — Permanent (recommended):

  1. Mở Excel > File > Options > Add-ins.Open Excel > File > Options > Add-ins.
  2. Ở Manage, chọn Excel Add-ins > bấm Go...In Manage, choose Excel Add-ins > click Go...
  3. Bấm Browse..., chọn file ExcelIntellisense64.XLL.Click Browse..., select ExcelIntellisense64.XLL.
  4. Bấm OK, đảm bảo add-in đã được tick chọn.Click OK, make sure the add-in is checked.

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.

3

Thêm hàm VBA của bạnAdd your VBA function

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:

  1. Mở workbook, nhấn Alt+F11 để mở VBA Editor.Open your workbook, press Alt+F11 to open the VBA Editor.
  2. File > Import File... > chọn modVBAFunctions.bas (hoặc module của bạn).File > Import File... > select modVBAFunctions.bas (or your own module).
  3. Lưu workbook dạng có Macro (.xlsm hoặc .xlsb).Save the workbook as macro-enabled (.xlsm or .xlsb).
  4. Đóng và mở lại Excel để add-in nạp lại VBAFunctions.xml.Close and reopen Excel so the add-in reloads VBAFunctions.xml.
Lưu ý:Note: Add-in chỉ đọc VBAFunctions.xml 1 lần lúc Excel mở. Sửa XML hoặc VBA xong phải đóng và mở lại Excel — không có nút "Reload". The add-in only reads VBAFunctions.xml once, when Excel opens the add-in. After editing XML or VBA, close and reopen Excel — there is no "Reload" button.
06

Thêm hàm VBA mớiAdding a new VBA function

Không cần build lại .xll — chỉ cần sửa VBA và XML.No .xll rebuild — just edit VBA and XML.

5.1

Viết hàm trong VBAWrite the VBA function

Private Function TenHam(A As Double, B As Double) As Double
    TenHam = A + B
End Function

Lưu ý quan trọng:Important:

  • Khai báo là 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.
  • Phải là Function (có giá trị trả về), không dùng Sub.Must be a Function (returns a value), not a Sub.
  • Tham số có thể là giá trị thường (Double, String, Boolean...) hoặc Range.Parameters can be plain values (Double, String, Boolean...) or a Range.
  • Module chứa hàm phải nằm trong 1 workbook/add-in đang mở khi gọi hàm.The module must be in a workbook/add-in that is open when the function is called.
5.2

Khai báo trong VBAFunctions.xmlDeclare it in VBAFunctions.xml

<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.
  • Tham số tùy chọn: bao tên trong dấu ngoặc vuông, ví dụ name="[Dieu_Kien]".Optional parameter: wrap the name in brackets, e.g. name="[Condition]".
  • Thứ tự Function/Param trong XML là thứ tự hiển thị trong tooltip.The order of Function/Param in the XML is the display order in the tooltip.
  • 1 Function hoặc Param khai báo sai chỉ bị bỏ qua đúng phần đó, không làm mất tooltip của các hàm còn lại.A malformed Function or Param is simply skipped — it won't break the tooltips for other functions.
  • 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.
5.3

Đóng và mở lại ExcelClose and reopen Excel

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.

07

Một số lưu ý khi dùngUsage notes

20

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.

16

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.