ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Block keyboard input (https://www.excelbanter.com/excel-programming/380429-block-keyboard-input.html)

[email protected]

Block keyboard input
 
Hi,

I have a scanner which sends data to a input box. The scanner uses some
kind of keyboard simulation, so the scaned text is directly visible in
the box without editing it first. Now I'm looking for some kind of
keyboard blocking code so that it's impossible for the user to edit the
box, but that the text from the keyboard simulation of the scanner is
visible.

As far as I know it's not possible with keyevents to handle this,
because this also blocks the input from the scanner. Does someone have
an idea to solve this problem? Thanks in advance.


jiebke

Block keyboard input
 
Can someone please help me. It's frustrating not to find a solution to
such a small problem!

Thanks in advance!


John Bundy

Block keyboard input
 
More specific would help but is this what you want?

True if Microsoft Excel is in interactive mode; this property is usually
True. If you set the this property to False, Microsoft Excel will block all
input from the keyboard and mouse (except input to dialog boxes that are
displayed by your code). Blocking user input will prevent the user from
interfering with the macro as it moves or activates Microsoft Excel objects.
Read/write Boolean

--
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

"jiebke" wrote in message
ups.com...
Can someone please help me. It's frustrating not to find a solution to
such a small problem!

Thanks in advance!




John Bundy

Block keyboard input
 
Or perhaps
Application.DataEntryMode = True

--
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

"John Bundy" wrote in message
...
More specific would help but is this what you want?

True if Microsoft Excel is in interactive mode; this property is usually
True. If you set the this property to False, Microsoft Excel will block
all input from the keyboard and mouse (except input to dialog boxes that
are displayed by your code). Blocking user input will prevent the user
from interfering with the macro as it moves or activates Microsoft Excel
objects. Read/write Boolean

--
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

"jiebke" wrote in message
ups.com...
Can someone please help me. It's frustrating not to find a solution to
such a small problem!

Thanks in advance!






jiebke

Block keyboard input
 
The user can't write the workbook. The workbook is only visible in the
background, on the foreground there is a userform where the user can
make some changes. All this changes can be made with the mouse, so the
mouse should work as usual. I let the scanner put the scaned code in a
textbox in the userform. Now I will that it is impossible for the user
to edit this textbox, but the scanner should still be able to put
values into it.



All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com