VBA code suddenly does not work

toneloke

New Member
Joined
Mar 16, 2012
Messages
45
Heya,

Have a macro that deletes buttons off a spreadsheet and modifies the macros on other buttons which has always worked. Suddenly it is not working. It appears the bevel numbers have changed. I have recorded a macro to reiterate the required actions, cut and pasted it in the original space and it still does not work.

Bewildered.

Thanks
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
There is something missing in this post that makes it impossible to render assistance.

Thanks RedBeard, What can I give you to assist? I am happy to show the code, but it forms part of a much longer process. And I think it is the Bevel numbers have randomly changed... but when I create new code with the new Bevel numbers, it still does not want to run.

Essentially, I am copying a spreadsheet and then modifying a few things on the spreadsheet - namely deleting buttons and relinking different macros to other buttons:

End If
ActiveSheet.Shapes.Range(Array("Bevel 7")).Select
Selection.Delete
ActiveSheet.Shapes.Range(Array("Bevel 8")).Select
Selection.Delete
ActiveSheet.Shapes.Range(Array("Bevel 6")).Select
Selection.Delete
ActiveSheet.Shapes.Range(Array("Bevel 5")).Select
Selection.OnAction = "Entire_Working_Hide_Lines"
ActiveSheet.Shapes.Range(Array("Bevel 9")).Select
Selection.OnAction = "Unhide_Lines_Working"

ActiveSheet.PageSetup.PrintArea = "$A$1:$N$700"

This code has worked for 6 years, but suddenly the Bevel numbers have changed and now the coding stops here and wants to be debugged. Changing the Bevel numbers does not help.
 
Upvote 0
There we go, some code to look at. :)

While this looks perfectly valid, it apparently isn't.
If you say this has worked for six years, what has changed in your working environment?
 
Upvote 0

Forum statistics

Threads
1,214,863
Messages
6,121,978
Members
449,058
Latest member
oculus

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