VBA compatibility between different versions of Office

Sorry if this is a stupid question.

What can I do to make VBA code work in Office 2003/2007/2010?

Can this be done, or should I create each VBA code for them?

I use

  • WinHttp.WinHttpRequest.5.1
  • Make many Windows API calls
  • Have five library links
  • wininet.dll
  • kernel32
  • Outlook.Application
  • InternetExplorer.Application

I am developing Office 2007, but users with Office 2010 cannot run code. Not sure if users are launching other office versions.

I also saw that you can create Excel-Addin in Visual Studio, but I do not have much experience in this area.

Thanks for any suggestions.

+4
source share
1 answer

for different versions of Excel, you can just use conditional compilation like #If Application.version>n then

However, for all users who have Win64 systems, you will have to provide various methods for calling API functions.

It is best to try and manage Excel using Automation, either from .NET using Office.Interop or VSTO.

+1
source

All Articles