2

I have VBA macros enabled on workbooks currently used on Desktop Excel.

However, my company has moved our workbooks from network drive storage onto Microsoft Teams so many people are now using Excel for Web to access them, upon which VBA does not work.

I have seen that it may be possible to port the VBA macros into Office Scripts (of which I have zero knowledge).

As far as I am aware, Office Scripts only works on the web version of Excel.

So my question is, is it possible to still use the vba macros when the workbooks are being used in the desktop version of Excel?

Thanks, Helen.

HelenT
  • 41
  • 3
  • 7
  • 1
    VBA cannot be used in Excel For the Web. They do work for Excel Desktop version though! – Ethan Aug 31 '20 at 11:48
  • 1
    Hi, I know that VBA only works for desktop version, but I'm looking for a solution to work on online version too and was wondering if it's possible for VBA and office scripts solution to reside in the same document or whether there will be conflicts in desktop Excel? Thank you – HelenT Sep 01 '20 at 12:37
  • 1
    Desktop Excel should not have conflicts unless you are working with multiple people in the same document! – Ethan Sep 01 '20 at 13:16

4 Answers4

2

Office Scripts will not conflict with the VBA macros in anyway. If you open the workbook in the desktop version, you should be able to continue working with the VBA. However, if you wish to do automation while doing work in Excel for web, Office Scripts allows you to record and edit/run. More details at https://aka.ms/office-scripts

For Office Scripts to work, you'll have to open the workbook in the browser (through the Teams SharePoint site).

Sudhi Ramamurthy
  • 2,358
  • 1
  • 10
  • 14
1

Excel for the web is a significantly less functional and slower application than Excel desktop. My company only uses Excel web for very simple spreadsheets.

Our intellectual property heavy engineering spreadsheets are never put on the web or run in Office 365 web interface.

Hai
  • 19
  • 1
1

Sudhi Ramamurthy's answer is correct—simply:

VBA scripts will not conflict with Office Scripts.

More info:

  • Office Scripts does only work on Excel for the Web
  • VBA does only work on Excel Desktop
  • Excel for the Web ignores the presence of VBA scripts in a workbook
  • Excel Desktop doesn't even know whether Office Scripts are applied to a workbook, even if they are shared on the workbook.
  • There shouldn't be any conflicts when multiple users are editing a workbook, even if some edit via Excel Desktop and others via Excel for the Web.
Daniel G. Wilson
  • 14,955
  • 2
  • 32
  • 39
  • 3
    Update: as of late in 2022, Office Scripts now also works on Excel for Windows Desktop, not just Excel for Web. – ed2 Apr 11 '23 at 12:48
0

In your Teams channel you can go to the file section and use the option Sync. Sometimes it's behind the ellipsis. This will synchronize your Teams folder structure on your desktop and will allow you to use the full functionality of Access, Macros, and so on. You can also create folders, copy and move files, as you normally do on your desktop, but without having to go to Teams. Be careful, though, that if you delete from your desktop, it is gone also form Teams.

ENIAC
  • 813
  • 1
  • 8
  • 19