N
Common Ground News

Does Excel VBA work on SharePoint?

Author

Matthew Cannon

Updated on March 18, 2026

Does Excel VBA work on SharePoint?

The Visual Basic for Applications service lets you interface with SharePoint from Microsoft Office applications. Use VBA to open the SharePoint URL and query for the data you want to display in the Office application, such as Access, Word or Excel.

Also asked, do Excel macros work on SharePoint?

1 Answer. When navigating to the file in Sharepoint, it's simple to open the file directly in Excel with live editing to Sharepoint, if you enable high frequency Autosave parameters in Excel (or globally across Office). This will enable your in-document Macros to operate. This can be in Sharepoint.

One may also ask, can you use VBA in Excel Online? Although you can't create, run, or edit VBA (Visual Basic for Applications) macros in Excel for the web, you can open and edit a workbook that contains macros. Any existing macros will remain in the workbook, and you can open the workbook in the Excel desktop app to view and edit the macros.

Additionally, how do I access SharePoint from VBA?

You need to download the file first and then open it. I store the file in the user's temp folder via the code below, and if necessary delete it upon closing. You can open a SharePoint file directly using VBA without having to save it to a temp folder.

Can office365 run VBA?

VBA is a COM technology that has a lot of dependencies on Windows-specific things. VBA will be supported on Windows desktop for the foreseeable future, but making it work on all the platforms Office 365 runs on is simply unrealistic, and isn't going to happen.

How do I enable macros in Excel?

Enable macros just for the current session
  1. Click the File tab.
  2. In the Security Warning area, click Enable Content.
  3. Select Advanced Options.
  4. In the Microsoft Office Security Options dialog box, click Enable content for this session for each macro.
  5. Click OK.

How do I set AutoSave time in Excel?

In the Excel Options dialog, click Save in the left pane, then go to Save workbooks section and type the interval you need in the text box among the option of Save AutoRecover information every minutes. 3. Click OK to close the dialog.

How do I turn on high frequency AutoSave parameters in Excel?

Below are the steps to turn on Auto-save in Excel:
  1. Click the File tab.
  2. Click on Options.
  3. In the Excel Options dialog box, click on the Save option on the left.
  4. Check the option – 'Save AutoRecover information every' checkbox.
  5. Check the Option – “AutoSave OneDrive and SharePoint Online files by default in Excel'.
  6. Click Ok.

How do I run a macro in a shared workbook?

Once you share a workbook, you can no longer edit the macros it contains. The macros still exist and they can still run; you just can't change them. That's because Excel doesn't support shared editing in Visual Basic. To edit the macros, remove sharing.

How do I find the SharePoint path?

SharePoint files can be access via a web URL. So to find that URL you can open the browser, then type the SharePoint site url. Then choose the library/folder you uploaded the file. Then you can right click the file and copy the URL.

Is VBA still supported?

Although pre-. NET Visual Basic is no longer supported or updated by Microsoft, the VBA programming language was upgraded in 2010 with the introduction of Visual Basic for Applications 7 in Microsoft Office applications.

What is an alternative to Excel VBA?

Office. js is the main direct alternative to VBA. It is the preferred language by Microsoft and the Office Extensibility team for doing most of the things VBA was originally designed for. Office.

How do I use VBA in Excel?

Insert VBA code to Excel Workbook
  1. Open your workbook in Excel.
  2. Press Alt + F11 to open Visual Basic Editor (VBE).
  3. Right-click on your workbook name in the "Project-VBAProject" pane (at the top left corner of the editor window) and select Insert -> Module from the context menu.
  4. Copy the VBA code (from a web-page etc.)

Can Excel for Android run macros?

Macros for Microsoft Office applications like Excel or Word already run in the versions of those programs for Android devices. Those same macros also run on iOS devices as well as Excel Online or desktop Excel. You need to write those macros in Office-js rather than VBA, however.

Do Excel macros work in OneDrive?

The macros are still stored in the file on OneDrive, and if you open them in Excel on your PC they will work.

What is the VBA in Excel?

VBA stands for Visual Basic for Applications. Excel VBA is Microsoft's programming language for Excel. and all the other Microsoft Office programs, like Word and PowerPoint.

How do I create a macro in Excel 365?

How to Create a Macro in Excel for Microsoft 365 for Mac, Excel 2019 for Mac, and Excel 2016 for Mac
  1. Go to the Developer tab.
  2. In the Code group, select Record Macro.
  3. In the Macro Name text box, enter a name for the macro.
  4. In the Shortcut key text box, type the lowercase or uppercase letter you want to use.

How do I run a Vbscript in Excel?

The easiest way to open the Visual Basic editor is to use the keyboard shortcut – ALT + F11 (hold the ALT key and press the F11 key). As soon as you do this, it will open a separate window for the Visual Basic editor.

How do I enable VBA in Excel 365?

You can open the Visual Basic Editor by adding the Developer tab to the Excel 2016 Ribbon or using the keyboard shortcut Alt F11.

From within an Office application, such Word 2016 or Excel 2016:

  1. Click File.
  2. Click Options.
  3. Click Customize Ribbon.
  4. Under the list of Main Tabs, select Developer.
  5. Click OK.

Does Office 365 use macros?

If you repeatedly perform a task, you can save time by using a macro to automate that task. However, not all macros are created equal—some contain malicious code. Here's how to enable (or disable) macros in Microsoft Office 365.

Why won't macros run in Excel?

To get macros enabled in all Excel workbooks by default, this is what you need to do: Go to the File tab > Options. On the left-side pane, select Trust Center, and then click Trust Center Settings… . In the Trust Center dialog box, click Macro Settings on the left, select Enable all macros and click OK.

How do I install VBA in Office 365?

Is VBA Installed for PowerPoint, Excel and Word?
  1. Open PowerPoint, Excel or Word.
  2. Press Alt+F8 on your keyboard.
  3. If a new VBE window opens, VBA is installed and enabled.