Application.InputBox has annoying cursor key reactions

D

Dan Williams

I have learned to use the Application.InputBox method instead of the
InputBox function when I want to distinguish blank input from
Cancel/ESC.

But Application.InputBox seems to have other features that I wish I
could avoid. It seems to be intended for the input of ranges, even
when you set it up to expect a text string. When I set up the input
field to contain a default text string and I want to modify that
string, if I use any cursor key or the Home key or the End key, instead
of moving the text cursor to where I want it, it inserts a "+" sign and
some "R_C_" text describing the current range of the spreadsheet
cursor.

In other words, I can't re-aim the text cursor to the beginning,
interior, or end of a default string by using the keyboard; I must
always use the mouse and/or the Delete and Erase keys.

Can anyone confirm that there's no easy way around this? (I don't want
to set up a Form or do something really elaborate. It's not that
important.)

Dan Williams
danwPlanet
 
N

NickHK

Dan,
Are you specifying that you want Text ? e.g.
Dim RetVal As Variant
Const TextOnly As Long = 2
RetVal = Application.InputBox("App InputBox Str Only", , "Dft Text", , , ,
TextOnly)

Arrow keys, Home, End work as expected.

nickHK
 
D

Dan Williams

Nick -
Yes, I had tried it with the 2 in there. In fact, when I paste your
code into a test Sub, I still get the symptoms. Odd.
Dan
 
N

NickHK

Dan,
Well, I don't what to say as I can't reproduce your problem with this code.

NickHK
 
D

Dan Williams

Well, the earlier suggestion works, so I'll go with that. Thanks for
trying it out!

In case anyone's inclined to snoop into the new mystery: I'm using
Excel 2000 and Windows 2000.
Dan
 
A

algan

Dan said:
Well, the earlier suggestion works, so I'll go with that. Thanks for
trying it out!

In case anyone's inclined to snoop into the new mystery: I'm using
Excel 2000 and Windows 2000.
Dan
 

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