Excelpipe stripping macro hotkey bindings?

Discuss WordPipe, ExcelPipe and PowerPointPipe. Get help with installation and running, notify us of bugs, request new features and enhancements.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
mkettler
Posts: 2
Joined: Sat Nov 07, 2009 4:35 am

Excelpipe stripping macro hotkey bindings?

Post 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.
mkettler
Posts: 2
Joined: Sat Nov 07, 2009 4:35 am

Re: Excelpipe stripping macro hotkey bindings?

Post 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. :(
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Excelpipe stripping macro hotkey bindings?

Post 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.
Post Reply