My VBA code does not work in Office 2007

hamohd70

New Member
Joined
Sep 21, 2016
Messages
35
I developed and tested some VBA code using Office 2013 and was working perfectly. BUT when I ran it on Office 2007, the code breaks at this line...

Code:
ActiveSheet.Range("D6").Value = "=" & Worksheets("Formula").Range("AlarmsStatusFormula").Value

the error msg I received was Run-time error 1004: Application-defined or object-defined error.

Can you please help with this?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
What is in the AlarmsStatusFormula cell? Does it involve any functions introduced after 2007 perhaps?
 
Last edited:
Upvote 0
Was this saved in an Excel version later than 2007? If so then an add-in for the later version will be missing from 2007.
 
Upvote 0
Is D6 part of a table that includes a column called Message?
 
Upvote 0
That should really be an array formula though, unless you meant to refer to that column in the same row?
 
Upvote 0
That should really be an array formula though, unless you meant to refer to that column in the same row?

It is an array formula. what I'm try to do is looking for "Recover" or " NR" in the column "Message" and then update D6 with "Found" or just leave it empty.

The named range "AlarmsStatusFormula" has the formula that will do the work for me.

Can it be something to do with the way Excel 2007 handles named ranges vs 2013?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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