VBA-Find.execute - How do I delete it?

G

goplayoutside

Hi,

I've created a new document by copying and pasting from other documents.
Now, when I am working in it, everything will suddenly disappear.

When I select redo, there is a command in there called VBA-Find.execute. If
I redo, everyting comes back.

When I hit 'CTRL+F', this shows up in the find box: '^?'. While I can work
around this, I would perfer not to. Is there some way to get rid of the
VBA-Find.execute command that I seem to be invoking by accident about every
15 or 20 minutes?

Thanks,
 
K

Klaus Linke

Hi,

Sounds as if you have a macro that does this, with a keyboard shortcut
assigned to it.
Every now and then you accidentally use that shortcut.

If you don't have that many macros, it shouldn't be hard to find browsing
"Tools > Customize", Commands Tab, Keyboard..., Category: Macros".
You can then delete the shortcut.
Or look in the VBA editor for the macro, and remove it.

If that doesn't work or you have lots of macros...
You could also use the macro code below to list all the commands you've
assigned shortcuts to:

Dim myKeyBinding As KeyBinding
For Each myKeyBinding In KeyBindings
Debug.Print myKeyBinding.Command, myKeyBinding.KeyString
Next myKeyBinding

After you've run that code, look through the list in the VBA editor
(Alt+F11), immediate window (Ctrl+G).

Then it shouldn't be too hard to guess what macro in what module is
responsible, and to either delete it or remove the keyboard shortcut.

Regards,
Klaus
 
F

fumei via OfficeKB.com

My guess is you are hitting Ctrl-F by accident, which is the default shortcut
for Find. Perhaps because you are going for Ctrl-C (in your copying and
pasting), accidently hitting F?

If you look at the menu for Find (Edit > Find) you should see Ctrl+F as the
listed built-in shortcut. This will NOT show up in the Immediate window with
Klaus' code. It is a Word built-in shortcut.

You can remove (or change) it.

1. Tools > Customize
2. select the Keyboard button
3. select Edit in the Categories (on the left)
4. scroll and select EditFind in the Commands (on the right)
5. select Current keys item (it will be Ctrl+F)
6. select the Remove button
7. select OK, and then Close

Ctrl-F will no longer be the shortcut to Find. If you look at the menu item
(Edit > Find) you will see it no longer shows Ctrl+F as the shortcut.

Klaus said:
Hi,

Sounds as if you have a macro that does this, with a keyboard shortcut
assigned to it.
Every now and then you accidentally use that shortcut.

If you don't have that many macros, it shouldn't be hard to find browsing
"Tools > Customize", Commands Tab, Keyboard..., Category: Macros".
You can then delete the shortcut.
Or look in the VBA editor for the macro, and remove it.

If that doesn't work or you have lots of macros...
You could also use the macro code below to list all the commands you've
assigned shortcuts to:

Dim myKeyBinding As KeyBinding
For Each myKeyBinding In KeyBindings
Debug.Print myKeyBinding.Command, myKeyBinding.KeyString
Next myKeyBinding

After you've run that code, look through the list in the VBA editor
(Alt+F11), immediate window (Ctrl+G).

Then it shouldn't be too hard to guess what macro in what module is
responsible, and to either delete it or remove the keyboard shortcut.

Regards,
Klaus
[quoted text clipped - 13 lines]
 
J

Jean-Guy Marcil

fumei via OfficeKB.com said:
My guess is you are hitting Ctrl-F by accident, which is the default shortcut
for Find. Perhaps because you are going for Ctrl-C (in your copying and
pasting), accidently hitting F?

If you look at the menu for Find (Edit > Find) you should see Ctrl+F as the
listed built-in shortcut. This will NOT show up in the Immediate window with
Klaus' code. It is a Word built-in shortcut.

Read the OP's message again. CTRL-F is not the problem, he (she?) noticed
that when doing CTRL-F to display the Find dialog box after having the
problem, it shows up with "^?" This means a macro was executed because the
"Undo" list has VBA-Find.Execute in it. My guess is that a macro that finds
all characters and replaces them with nothing is run.

In any case, in a default set up, CTRL-F just pops up the find dialog and
adds nothing to the "Undo" list.

So it is clear that somehow a macro is launched.
Klaus' code will help locate that macro so that the key assignment can be
undone (The OP does not seem to know which key combination launches the
macro...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top