![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 1
|
I am scanning barcodes with a scan gun that plugs into my keyboard, so the characters are being inputted through the keyboard. My problem is I need a macro in Excel that will automatically hit the Enter Key when data is put into a Cell, and I know nothing about Excel Macros. Can anyone help?
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 81
|
go into the excel help file (visual basic side) and search for keypress events!
Ed |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 81
|
go into the excel help file (visual basic side) and search for keypress events!
Ed |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
Hello,
This is an interesting question. I don't think that you could have a macro that pressed enter once data is entered because Excel would be in edit mode (macros can't run when a cell is being edited). However, it would be entirely possible to use a textbox which receives the barcode input and then transfers the data to your worksheet. This is possible because you can check a textbox's contents continuously and take action through a macro when a certain stage has been reached (e.g. the entire barcode number is in the textbox). Are the barcode numbers all the same length? Where on the worksheet are the numbers going - are they all in one column being added a row at a time or what? If you can provide this info then me or someone else on this board should be able to point you in the right direction. Regards, Dan |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|