Intercept Overtype macro insert Symbol?

J

Joacim

Hi,

Thought I would experiment with replacement key (anything but overtype).

I think this intercepts Overtype but I want the Cent sign Hex 0092 to
insert - do I have to declare as string is that only way?

ChrW (&H0092) cent sign

Option Explicit

' Do nothing (or do something)

Sub Overtype()

????

End Su
 
J

Jezebel

The built-in overtype command toggles between overtype and replace modes,
and is run when you press Insert or double-click OVR on the status bar. If
you hijack this command you'll get a cent symbol every time you press
Insert. But to answer your question --

Sub OverType()
Selection.TypeText "¢" 'or Selection.TypeText ChrW(&HA2)
End Sub
 
J

Joacim

Greatt thank you Jezebel. I shall hijack it and see how I go. Plenty of
things I can use it for I am sure.
 
J

Joacim

I use that to the max. And that is minum 2 keystrokes. This is one
keystroke.

I will find a better use eventually.
 
T

Tony Jollans

Personally I think hijacking the Insert key like that is, shall we say,
innovative.

Autocorrect is as many keystrokes (minimum 1) as you choose to make it and I
have no idea what you mean when you say you use it to the max.

What are you really trying to do?
 
J

Joacim

I tried using INS key as Paste and I end up with too much CLIPBOARD pasting
accidentally..
I don't want overtype mode - so I thought I would use the key for something
I can use more frequently.

I use autocorrect. I use autotext. I also use keyboard shortcuts.

Any ideas are very welcome.
 

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