Application Defined Error Excel 2013 ONLY

jamesblack90

New Member
Joined
Jun 9, 2015
Messages
44
Hey Guys,

Have written everything using Office Mac 2010, and it works perfectly. I am now testing on Office 2013 and have the following issue with this line:

Range("K39").Value = strCopyright(1)

and only this line. It says "Application-defined or object-defined error". It works on all other sheets, and it works for K38 in the Proposal worksheet. I can't work it out :/

Also, as a side question, is it normal that Excel 2013 takes FOREVER to run macros (Like I have to wait up to a minute when I activate certain sheets and it calls one or two quite small subs) ..when they happen instantly on my less powerful macbook running 2010?
Code:
Public Sub copyright_info()
Dim strCopyright(1) As String


strCopyright(0) = "xxxx"
strCopyright(1) = "xxxx"


ActiveSheet.Unprotect


Select Case ActiveSheet.name
    Case "Home"
        Range("H32").Value = strCopyright(0)
        Range("H33").Value = strCopyright(1)
        
    Case "Proposal"
        Range("K38").Value = strCopyright(0)
        Range("K39").Value = strCopyright(1)
        
    Case "Servicing"
        Range("P74").Value = strCopyright(0)
        Range("P75").Value = strCopyright(1)
        
    Case "Equity Calculator"
        Range("R46").Value = strCopyright(0)
        Range("R47").Value = strCopyright(1)
        
End Select


ActiveSheet.Protect


End Sub
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I am very much a novice when it comes to Excel, but if you comment out that line for testing purposes, does the rest work?

As for the performance, I learned of Application.ScreenUpdating = FALSE . If you put that at the start of the code block and Application.ScreenUpdating = TRUE at the end, I found that I gained quite a bit of speed in my code.

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,214,974
Messages
6,122,536
Members
449,088
Latest member
RandomExceller01

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