Code Issues: Not recognizing objects from 2013 to 2010

JaredMcCullough

Well-known Member
Joined
Aug 1, 2011
Messages
516
I was working on a project on 2013 at work, took it home and I am using 2010 at home. The problem I have run into is I had created a handful of embedded textboxes on "Sheet2". I set the objects to visible false and was using the following code which was working fine on Excel 2013 but not is coming up with an error that none of the textboxes are being recognized. Any suggestions would be appreciated:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

Dim ws As Worksheet
Dim Rng As Range


If Target.Address(0, 0) = "E12" Then

With Sheets("Variance Database")
        Set Rng = .Range(.Range("A8"), .Range("A" & Rows.Count).End(xlUp))
        Rng.Name = "NamedRng"
    End With


With Target.Validation
    .Delete
    .Add Type:=xlValidateList, Formula1:="=NamedRng"
End With
End If

If Target.Address(0, 0) = "E12" Then
    ' Call your macro that makes objects appear here
    If Range("O12").Value = "Emergency" Then
    TextBox21.Visible = True
    TextBox22.Visible = True
    TextBox23.Visible = True
    TextBox24.Visible = True
    TextBox25.Visible = True
    TextBox26.Visible = True
    CheckBox21.Visible = True
    CheckBox22.Visible = True
    CheckBox23.Visible = True
    CheckBox24.Visible = True
    CheckBox25.Visible = True
    CheckBox26.Visible = True
    CheckBox27.Visible = True
    CheckBox28.Visible = True
    TextBox26.Value = "*Print off variance and complete Field Form portion at jobsite along with contract company" & vbNewLine & "*Ensure lead Contract Representative signs below to verify that all contract employees have received the appropriate training" & vbNewLine & "*Receive all approvals prior to commishioning work. Verbal approvals are acceptable as long as live signatures are obtained within 24 hours of completion of the job." & vbNewLine & "*Send live hard copies back to the site Process Safety Engineer for recordkeeping. Ensure electronic approvals are completed to close out the pending variance in the database."
    Else
    TextBox21.Visible = False
    TextBox22.Visible = False
    TextBox23.Visible = False
    TextBox24.Visible = False
    TextBox25.Visible = False
    TextBox26.Visible = False
    CheckBox21.Visible = False
    CheckBox22.Visible = False
    CheckBox23.Visible = False
    CheckBox24.Visible = False
    CheckBox25.Visible = False
    CheckBox26.Visible = False
    CheckBox27.Visible = False
    CheckBox28.Visible = False
    End If
End If
End Sub
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
firstly, are they ActiveX text boxes ??
If so, see the BIG orange banner at the top of the page !
Also, if they are formatted with 2013 properties, those formats may not be available in 2010.
It's best to avoid trying to open a workbook in an older version of Excel as there can be compatibility issues.
 
Upvote 0
firstly, are they ActiveX text boxes ??
If so, see the BIG orange banner at the top of the page !
Also, if they are formatted with 2013 properties, those formats may not be available in 2010.
It's best to avoid trying to open a workbook in an older version of Excel as there can be compatibility issues.

Yes they are ActiveX text boxes. I apologize as the Big Orange Banner seemed to have escaped me (who would have thought the relevance ha) but I guess relationally I would then inquire that if there are any fixes that can be made to the Objects them self? Say if I was to make Shapes such as squares or use some other means?

By the way thanks for the heads up
 
Upvote 0
I don't believe so. I think the instructions provided in the Banner link need to be followed, not as you hoped, the objects themselves.
But if you created simple shapes, as you mentioned, they would work, but be careful in the formatting to make sure they are still backward compatible.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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