Page 1 of 1
Excelpipe stripping macro hotkey bindings?
Posted: Sat Nov 07, 2009 4:41 am
by mkettler
I just used excelpipe 4.6.14 and Excel 2003 sp3 to preform a trivial update for some macros in a large group of excel spreadsheets. This was done using a "code module" search and replace. And looking at the code for the macros before and after, that much worked.
However, every macro that got updated lost its hotkey bindings.
If I edit the macro by hand in Excel and save it, the binding remains intact.
Is there some way to prevent this? If I have to go back and fix the hotkey bindings in all those documents, it is almost as much work as hand editing all the macros.
Re: Excelpipe stripping macro hotkey bindings?
Posted: Sat Nov 07, 2009 4:54 am
by mkettler
For reference, ExcelPipe 4.5.1 did the same thing to the same files...
I also tried just creating a real simple spreadsheet, with a real simple macro that created a string for me to have excelpipe modify... Again, it correctly modified the macro code, but removed the hotkey binding.
So, I made an empty sheet, and created a new macro named "foo"
Sub foo()
Dim sFilename As String
sFilename = "C:\\temp\\foo.txt"
End Sub
I bound this to control-f and saved the workbook.
I copied this to another directory, and had excelpipe do:
Find what: "C:\\temp\\"
Replace with: "d:\\temp\\"
Search type: "normal search"
Search in: "code modules"
Options: (blank)
Running that over the workbook correctly modified the string in foo, but the macro no longer has a hotkey.
Re: Excelpipe stripping macro hotkey bindings?
Posted: Mon Nov 09, 2009 2:40 pm
by DataMystic Support
Hi there,
This is not something that we are explicitly destroying - MS Excel must be doing this all by itself in the background. I suspect than when you edit it by hand MS Excel keeps track of the binding for you, but loses this if the entire text is replaced in one hit, as ExcelPipe does. We will consider iterating over the KeyBindings to re-attach them in a future version. Yours is the first request we have had.