Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default need help re send/recieve com port data from excel and auto CR/LF

Hi
I need to design a sheet that is of a set size
i.e 20 rows by 20 columns
I'm inputting the data with a barcode scanner (via serial port)
I need the cursor to automatically go to a new line and start of line
once the top line is full of data.
I have spent hours reading help and searching the net but to no success
can someone please help me here?

I also have an even harder problem
and that is -
can excel send a "?" chr via a com port and
then input the response ( a weight in KG) back into a cell?
its a set of scales for animals

Thanks in advance


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default need help re send/recieve com port data from excel and auto CR/LF

OK I worked out the 1st part by searching newsgroups - google
what a nice tool btw!

and learned about locking and protecting worksheets

but the 2nd part
that is - I need to send 1 charector from excel 2000 - a ? to com1
which a set of scales is attatched to , once the scales recieves the ? chr
it sends the current weight back through the com port
which I need to enter in a cell names weight.

I would really appreciate some hints

I tried to recall old dos commands like rediection and pipes but
managed to send the ? but could not recieve anything
the scales must use 4800,8,n,1

TIA

Peter



"Ftca" wrote in message
...
Hi
I need to design a sheet that is of a set size
i.e 20 rows by 20 columns
I'm inputting the data with a barcode scanner (via serial port)
I need the cursor to automatically go to a new line and start of line
once the top line is full of data.
I have spent hours reading help and searching the net but to no success
can someone please help me here?

I also have an even harder problem
and that is -
can excel send a "?" chr via a com port and
then input the response ( a weight in KG) back into a cell?
its a set of scales for animals

Thanks in advance




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default need help re send/recieve com port data from excel and auto CR/LF

Sub Macro5()
Dim ctrl as Long
Dim tmpstr as String
Open "LPT1:" For Output As #1
Print #1, "[Start of Printing Test]"
For ctrl = 1 To 10
tmpstr = "Printing Line " + Str(ctrl)
Print #1, tmpstr
Next
tmpstr = "[End of printing test]" + Chr(12)
Print #1, tmpstr
Close #1
End Sub


uses the lpt1 device name to send text to a printer. COM1 is the device
name for the com1 port. You could try a similar approach.

You might want to open COM1 as binary and use the PUT command to write the
"?" character.

http://support.microsoft.com/support...eio/fileio.asp
File Access with Visual Basic® for Applications

--
Regards,
Tom Ogilvy



Ftca wrote in message
...
OK I worked out the 1st part by searching newsgroups - google
what a nice tool btw!

and learned about locking and protecting worksheets

but the 2nd part
that is - I need to send 1 charector from excel 2000 - a ? to com1
which a set of scales is attatched to , once the scales recieves the ? chr
it sends the current weight back through the com port
which I need to enter in a cell names weight.

I would really appreciate some hints

I tried to recall old dos commands like rediection and pipes but
managed to send the ? but could not recieve anything
the scales must use 4800,8,n,1

TIA

Peter



"Ftca" wrote in message
...
Hi
I need to design a sheet that is of a set size
i.e 20 rows by 20 columns
I'm inputting the data with a barcode scanner (via serial port)
I need the cursor to automatically go to a new line and start of line
once the top line is full of data.
I have spent hours reading help and searching the net but to no success
can someone please help me here?

I also have an even harder problem
and that is -
can excel send a "?" chr via a com port and
then input the response ( a weight in KG) back into a cell?
its a set of scales for animals

Thanks in advance






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default need help re send/recieve com port data from excel and auto CR/LF

Thanks Tom

But I've hit a new brick-wall
I don't suppose you know a way to get a string of text from a small text
file
5 charecters to be exact - a weight 000KG
I know about - Data , import external data
but the user is so pc clumsy
I need to automate it

what I need is to extract the weight which is now refreshed with every row
and place it in a cell

btw
I worked the whole lot out myself
I wrote a file using delphi to send a byte to the scales and recieve the
weight into a text file
I'm just stuck on this - getting the weight from the text file into the
spreadsheet

any help would be most appreciated

regards
Peter


"Tom Ogilvy" wrote in message
...
Sub Macro5()
Dim ctrl as Long
Dim tmpstr as String
Open "LPT1:" For Output As #1
Print #1, "[Start of Printing Test]"
For ctrl = 1 To 10
tmpstr = "Printing Line " + Str(ctrl)
Print #1, tmpstr
Next
tmpstr = "[End of printing test]" + Chr(12)
Print #1, tmpstr
Close #1
End Sub


uses the lpt1 device name to send text to a printer. COM1 is the device
name for the com1 port. You could try a similar approach.

You might want to open COM1 as binary and use the PUT command to write the
"?" character.

http://support.microsoft.com/support...eio/fileio.asp
File Access with Visual Basic® for Applications

--
Regards,
Tom Ogilvy



Ftca wrote in message
...
OK I worked out the 1st part by searching newsgroups - google
what a nice tool btw!

and learned about locking and protecting worksheets

but the 2nd part
that is - I need to send 1 charector from excel 2000 - a ? to com1
which a set of scales is attatched to , once the scales recieves the ?

chr
it sends the current weight back through the com port
which I need to enter in a cell names weight.

I would really appreciate some hints

I tried to recall old dos commands like rediection and pipes but
managed to send the ? but could not recieve anything
the scales must use 4800,8,n,1

TIA

Peter



"Ftca" wrote in message
...
Hi
I need to design a sheet that is of a set size
i.e 20 rows by 20 columns
I'm inputting the data with a barcode scanner (via serial port)
I need the cursor to automatically go to a new line and start of line
once the top line is full of data.
I have spent hours reading help and searching the net but to no

success
can someone please help me here?

I also have an even harder problem
and that is -
can excel send a "?" chr via a com port and
then input the response ( a weight in KG) back into a cell?
its a set of scales for animals

Thanks in advance








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default need help re send/recieve com port data from excel and auto CR/LF

See answer in .misc


--
Regards,
Tom Ogilvy


Ftca wrote in message
...
Thanks Tom

But I've hit a new brick-wall
I don't suppose you know a way to get a string of text from a small text
file
5 charecters to be exact - a weight 000KG
I know about - Data , import external data
but the user is so pc clumsy
I need to automate it

what I need is to extract the weight which is now refreshed with every row
and place it in a cell

btw
I worked the whole lot out myself
I wrote a file using delphi to send a byte to the scales and recieve the
weight into a text file
I'm just stuck on this - getting the weight from the text file into the
spreadsheet

any help would be most appreciated

regards
Peter


"Tom Ogilvy" wrote in message
...
Sub Macro5()
Dim ctrl as Long
Dim tmpstr as String
Open "LPT1:" For Output As #1
Print #1, "[Start of Printing Test]"
For ctrl = 1 To 10
tmpstr = "Printing Line " + Str(ctrl)
Print #1, tmpstr
Next
tmpstr = "[End of printing test]" + Chr(12)
Print #1, tmpstr
Close #1
End Sub


uses the lpt1 device name to send text to a printer. COM1 is the

device
name for the com1 port. You could try a similar approach.

You might want to open COM1 as binary and use the PUT command to write

the
"?" character.

http://support.microsoft.com/support...eio/fileio.asp
File Access with Visual Basic® for Applications

--
Regards,
Tom Ogilvy



Ftca wrote in message
...
OK I worked out the 1st part by searching newsgroups - google
what a nice tool btw!

and learned about locking and protecting worksheets

but the 2nd part
that is - I need to send 1 charector from excel 2000 - a ? to com1
which a set of scales is attatched to , once the scales recieves the ?

chr
it sends the current weight back through the com port
which I need to enter in a cell names weight.

I would really appreciate some hints

I tried to recall old dos commands like rediection and pipes but
managed to send the ? but could not recieve anything
the scales must use 4800,8,n,1

TIA

Peter



"Ftca" wrote in message
...
Hi
I need to design a sheet that is of a set size
i.e 20 rows by 20 columns
I'm inputting the data with a barcode scanner (via serial port)
I need the cursor to automatically go to a new line and start of

line
once the top line is full of data.
I have spent hours reading help and searching the net but to no

success
can someone please help me here?

I also have an even harder problem
and that is -
can excel send a "?" chr via a com port and
then input the response ( a weight in KG) back into a cell?
its a set of scales for animals

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Signature in Excel Send Doug Excel Discussion (Misc queries) 1 February 4th 10 05:34 PM
How do I set an auto send button in Excel?〈 j a houghton Excel Discussion (Misc queries) 3 April 7th 09 11:02 PM
send data to another cell auto Yojinbou Excel Worksheet Functions 0 October 23rd 06 09:39 AM
Can Excel auto-send an email on a given date? dannykray_z Excel Discussion (Misc queries) 1 April 18th 06 07:43 PM
Interfacing USB port and MS Excel Arun K Excel Discussion (Misc queries) 0 November 7th 05 07:55 AM


All times are GMT +1. The time now is 11:51 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"