View Single Post
 
Old 12-13-2012, 09:04 AM
hanvyj hanvyj is offline Windows XP Office 2003
Advanced Beginner
 
Join Date: Feb 2012
Posts: 33
hanvyj is on a distinguished road
Default How to make an add-in/global macro

Hi, a colleague was complaining about there not being a copy formulae (without changing the references) function in excel, he used to have a macro that did it but it was lost.

I'm reasonably competent at macros so I said it would be no problem for me to make one that did what he wanted. It wasn't, I have a macro that copies and pastes how I want it - I even added some buttons to the ribbon so it should be easy for him to use.

However, I can only use these with the worksheet I wrote the module on.

I read that I need to add the worksheet as an addin to excel. I went to addins and went through it. Now I have two problems:

1) Whenever I open Excel, eg through the start menu, it automatically opens the "CopyPasteFormula.xlsm" that I added as an addin! This person is going to get really confused with that and forget to go file-new and destroy the addin sheet... This also means Half the time I click the button to run the macro it it comes up with "this file is already open etc etc" because its opened it before

2) The macros don't work properly anymore... I added the buttons, the macros appear in the "macro" section but don't operate as expected. I get an error copying something with no clipboard, as I would expect - but they don't actually copy and paste (they do If I do this in the "CopyPasteFormula.xlsm" sheet that I added as the addin).

I tried adding some breakpoints and message boxes, neither worked.

It might be related to the issue that I don't have access to the Application Data/Microsoft/Addins folder on my PC, so I selected "do not copy" when adding the addon.
Reply With Quote