Jumat, 20 Mei 2016

[MS_AccessPros] Re: Get return value from Excel user function in Access



Here is a very simplified snippet that returns the Excel version number.

Public Function ExcelVersion() As String
    Dim objXL As Excel.Application
    Dim strVersNum As String
    Set objXL = CreateObject("Excel.Application")
    strVersNum = objXL.Version
    ExcelVersion = strVersNum
    Set objXL = Nothing
End Function

Bill Mosca, Founder - MS_Access_Professionals
Microsoft Office Access MVP
My nothing-to-do-with-Access blog

---In MS_Access_Professionals@yahoogroups.com, <desertscroller@cox.net> wrote :

My application links a spreadsheet from Excel to Access (both 2010).  To get the data ready several user defined functions were created in Excel.  The issue is I would like to ensure that the user is using the current version of the add-in.  My idea is to create a Excel function to identify the current version.  Access would run the function and retrieve the version number and compare it to the latest released version.  I realize I will need to activate Excel with the add-in loaded to accomplish the data request.  Just not sure how to get the return value.

Any suggestions would be greatly appreciated.



Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Upgrade your account with the latest Yahoo Mail app
Get organized with the fast and easy-to-use Yahoo Mail app. Upgrade today!



Tidak ada komentar:

Posting Komentar