Better HN
topnewbestaskshowjobs
Log inSign up

n013

27 karma · joined Feb 16, 2024 (2y ago) · 11 submissions

Submissions

comment 9mo ago · link · parent

>VBA is permanently disabled in most large corporate and government environments these days as a security precaution.

This is exactly the argument used for deprecating a so powerful language, but It's all a Microsoft marketing strategy. Organizations creating and running only their workbooks are equally enforced to shutting down VBA, Why? Because VBA doesn't pay Microsoft rent.

comment 9mo ago · link · parent

Link to the subject: https://ecp-solutions.github.io/ASF/Language%20reference.htm...

3.

Monkey Patching in VBA(ecp-solutions.github.io ↗)

46 points · by n013 · 9mo ago · 14 comments

comment 9mo ago · link · parent

At VBA side the code is clean and highly manageable.

Sub RunModule() Dim eng As New ASF

    ' Set working directory
    eng.InjectVariable "wd", ThisWorkbook.Path
    
    ' Execute module file
    Dim result As Variant
    result = eng.Execute(ThisWorkbook.Path & "\main.vas")
    
    Debug.Print result
End Sub

ASF isn't just a framework, is a modern language that we can run inside VBA.

5.

Sandboxed script execution from VBA with support for module system(github.com ↗)

1 points · by n013 · 9mo ago · 1 comment

comment 10mo ago · link · parent

Honestly, ASF is literally sandboxed. Objects cannot be injected in the runtime. Also, VBA Expressions is intentionally limited to receive and return VBA strings. So, the system is safe for execute code from (almost) anyone.

comment 10mo ago · link · parent

You can inspect the AST in order to debug your code. For syntax highlighting, use tools like Notepad++ (ASF shares most of the syntax with Javascript). Each piece of code is commented, no obscure machine code.

8.

Hacking VBA to support native scripting runtime with no COM dependencies(github.com ↗)

24 points · by n013 · 11mo ago · 10 comments

comment 2y ago · link · parent

I found a paper, having a GitHub repository, that describes a new methodology that can be an improvement for the famous CleverCSV Python library.

10.

CSV dialect sniffing, potential CleverCSV enhancement(github.com ↗)

1 points · by n013 · 2y ago · 1 comment