ActiveX backward compatiblity issues with 365 to 2010

KendelSmith

New Member
Joined
Jan 28, 2015
Messages
4
I am transitioning a set of interrelated Excel documents that use VBA code for lookups, data manipulation and calculations from Excel 2010 to Excel 365. I have both on my development machine, however these get sent (via email) to customers all over and then returned. I use .xlmb file formats for the file size savings however this doesn't seem to be affecting the outcome.


CURRENT ISSUE
When I save a workbook using 365 on my development machine, users get errors when performing an action that runs my VBA code when run from a machine that only has 2010 installed (if both versions are installed, the behavior does not seem to happen). I have focused the problem to when there is code in a module and there is an ActiveX control on a sheet. Only this combination seems to create the issue.


The test file/code I've created that consistently shows the issue is a workbook with the following code in a module:


Code:
Dim strBook As String
' Worksheet Names
Public Const wksTest = "Sheet1"


Public Function TestMe(PassedSheet As String)


    strBook = ActiveWorkbook.Name


    Workbooks(strBook).Worksheets(PassedSheet).Protect
    Workbooks(strBook).Worksheets(PassedSheet).Unprotect


    MsgBox "Worked from function", vbOKOnly, "Response"


End Function

And code in the sheet. It works with this code:


Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)


    If Target.Row = 2 And Target.Column = 2 Then
    
        strBook = ActiveWorkbook.Name
        
        Me.Protect
        Me.Unprotect
        
        MsgBox "Worked from sheet", vbOKOnly, "Response"
        
        Call TestMe(wksTest)
    
    End If


End Sub


However if an ActiveX Command Button named "TestButton" is added to Sheet1 and this code is added:


Code:
Private Sub TestButton_Click()


    strBook = ActiveWorkbook.Name
    
    Me.Protect
    Me.Unprotect
    
    MsgBox "Worked from Button", vbOKOnly, "Response"
    
    Call TestMe(wksTest)


End Sub



The workbook will no longer function if saved from 365 and opened with 2010 on a machine with only 2010 installed.


I would love to get feedback on possible fixes for this issue.


Thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Anything to do with the orange banner at the top of the page?
 
Upvote 0
Nope. I tested that first and it appears to be something entirely different (at least, the MicroSoft FixIt doesn't help and it only affects worksheets that have been saved using 365 and opened by 2010 with ActiveX and functions in a module ... very specific)
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top