A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Actually, Microsoft provides comprehensive, free developer frameworks and documentation designed to help users build on their existing Excel knowledge. Because you already understand programming logic from working with Excel 2010 macros, these resources should help you transition to modern, cloud-based automation.
The primary hub for modern Excel automation is the official Microsoft Learn Office Scripts documentation, which covers everything from recording macros to writing scripts from scratch.
The Microsoft Support guide Introduction to Office Scripts introduces recording basic tasks without writing code, using the cloud-based Code Editor, and sharing automated workbooks across an organization. The Office Scripts Code Editor documentation explains the editor environment, including IntelliSense, debugging, and keyboard shortcuts. The Office Scripts fundamentals documentation provides the starting point for developers, explains the required main execution function (function main(workbook: ExcelScript.Workbook)), and describes how scripts interact with spreadsheet objects. The Office Scripts API reference provides the technical reference for classes, objects, namespaces, and methods. It serves a similar purpose to the VBA Object Browser, allowing you to look up the properties and methods available for ranges, worksheets, tables, and other Excel objects.
Office Scripts are built on TypeScript, a language based on JavaScript that adds static typing. Microsoft applies restrictions to ensure scripts execute within the security boundaries of the Office Scripts environment. When transitioning from VBA to modern scripting, keep in mind a number of differences. Traditional Excel 2010 VBA uses Visual Basic for Applications and runs primarily in the desktop Excel client. Office Scripts use TypeScript and are designed for Excel on the web, Windows, and Mac (subject to platform and feature availability). In VBA, you might access a cell using ActiveWorkbook.Sheets("Sheet1").Range("A1"). In Office Scripts, the equivalent approach is workbook.getActiveWorksheet().getRange("A1"). VBA macros are stored in macro-enabled workbooks and are subject to macro security settings, whereas Office Scripts are managed through Microsoft 365 and its associated security and access controls.
Before writing complex scripts, review Microsoft's official TypeScript restrictions in Office Scripts. This documentation describes security and execution restrictions, including the prohibition of JavaScript's eval() function and limitations on modifying certain built-in objects and namespaces.
For advanced cloud integration, the Office Scripts and Power Automate documentation explains how to run Excel scripts through automated workflows. Unlike traditional VBA macros, which generally execute within a desktop Excel session, Office Scripts can be invoked through Power Automate flows. For example, a flow can run a script when a supported trigger occurs, such as receiving an email or submitting a form, and pass data between Excel and other services. Scripts can also return values to the flow for use in subsequent automation steps.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin