If you haven’t already done so, check out the System Control link below and see if it solves your problem.
Most people usually leave their cable box on all the time, which would eliminate the need for a macro. But if you want to turn yours off, along with the TV, and still cannot make it work, there are other ways to do this, especially if all you want the macro to do is to turn them on or off. The 3100 is very flexible and offers various options.
One option is to use the procedure on page 62 of the manual. You could put the power commands on the power button of either, or both, the TV and CBL screens. This would allow you to use the systems buttons for something else. I am still not sure if you can put this on a square button key, or if it has to go on a rectangular label key, but either way it would still be easier than a macro on a system key.
Your question, and many others which may come up, will be answered somewhere in the following threads.
RM-AV3000/3100 NEWCOMER’S PACKAGE-WELCOME-CHECK THESE OUT (IF YOU HAVEN’T ALREADY DONE SO) AND SAVE YOURSELF SOME PROBLEMS SYSTEM CONTROL KEYS: Everything you need to know about them HOW TO LABEL, CHANGE OR HIDE BUTTONS CHANGING BATTERIES (May not be necessary on RM-AV3100, but why take a chance when it's only 20 seconds?)AND IF YOU HAVE A SONY RECEIVER: CHANGING YOUR RECEIVER AND REMOTE TO AV1 (or AV2) COMMAND MODE AND HERE IS SOME MORE INFO IN CASE THE MANUAL GETS TOO CONFUSING REMOTE CENTRAL RM-AV3000/RM-AV3100 FORUM REVIEW (INCLUDING THE QUICK PROGRAMMING GUIDE) ALSO, CHECK OUT THE TIPS AND TRICKS SECTION.