Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
sds sds is offline
external usenet poster
 
Posts: 4
Default tales of woe

I have a barcode scanner that scans information into
excel, but in the first cell, A1. I want to create a
spreadsheet so A1 will be a title (e.g.Barcode) how can i
get it to scan straight into A2. Also how can then i get a
time logged into the next box B2 every time i scan a
barcode??
Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default tales of woe

Depends on how your barcode scanner is transmitting the information to
excel. If it is simulating keyboard input, then you would activate the cell
where you want the input. You would then use the change event to place a
time in the adjacent cell.

Right click on the sheet tab and select view code. Put in code similar to
this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 then exit sub
If Target.Column = 1 And Target.Row 1 Then
If Target.Offset(0, 1) = "" Then
Target.Offset(0, 1).Value = Date
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy"
End If
Next
End Sub

--
Regards,
Tom Ogilvy


"sds" wrote in message
...
I have a barcode scanner that scans information into
excel, but in the first cell, A1. I want to create a
spreadsheet so A1 will be a title (e.g.Barcode) how can i
get it to scan straight into A2. Also how can then i get a
time logged into the next box B2 every time i scan a
barcode??
Thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default tales of woe

I had a typo - here is a revision:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Target.Row 1 Then
If Target.Offset(0, 1) = "" Then
Target.Offset(0, 1).Value = Date
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy"
End If
End If
End Sub


--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
Depends on how your barcode scanner is transmitting the information to
excel. If it is simulating keyboard input, then you would activate the

cell
where you want the input. You would then use the change event to place a
time in the adjacent cell.

Right click on the sheet tab and select view code. Put in code similar

to
this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 then exit sub
If Target.Column = 1 And Target.Row 1 Then
If Target.Offset(0, 1) = "" Then
Target.Offset(0, 1).Value = Date
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy"
End If
Next
End Sub

--
Regards,
Tom Ogilvy


"sds" wrote in message
...
I have a barcode scanner that scans information into
excel, but in the first cell, A1. I want to create a
spreadsheet so A1 will be a title (e.g.Barcode) how can i
get it to scan straight into A2. Also how can then i get a
time logged into the next box B2 every time i scan a
barcode??
Thanks in advance





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"