Writing to Excel header from Access

P

Pastor Del

I am designing an Excel data report for my customer. The data is stored in
Access 2000 so I need to write it into Excel. Everything is working fine
except the barcode file name I have to put in the right header. My customer
says they can not scan it. (I use the same barcode in the body of the report
and they can scan it.) Here is the code I am using.

ws.PageSetup.RightHeader = "&R&12" & Chr(13) & Chr(13) & strFileName &
Chr(13) & "&""3 of 9 Barcode""&15strFileName"

strFileName is the file name. Its first occurance, in MS Sans Serif, is
readable but when the font changes to 3 of 9 barcode my customer has problems
scanning. What am I doing wrong?
 
A

Arvin Meyer [MVP]

Pastor Del said:
I am designing an Excel data report for my customer. The data is stored in
Access 2000 so I need to write it into Excel. Everything is working fine
except the barcode file name I have to put in the right header. My
customer
says they can not scan it. (I use the same barcode in the body of the
report
and they can scan it.) Here is the code I am using.

ws.PageSetup.RightHeader = "&R&12" & Chr(13) & Chr(13) & strFileName &
Chr(13) & "&""3 of 9 Barcode""&15strFileName"

strFileName is the file name. Its first occurance, in MS Sans Serif, is
readable but when the font changes to 3 of 9 barcode my customer has
problems
scanning. What am I doing wrong?

Perhaps you need a larger barcode font in Excel.
 
P

Pastor Del

It's more than the size. At the present it's font size is 15.

When i print it out and compare it with a print out where I manually put
this -- *&[File]* -- in the right header the barcodes are significantly
different.
 
D

Douglas J. Steele

Actually, I believe in Excel you can get away with just Chr(10). I would
think that Chr(13) by itself would definitely be wrong, though.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Arvin Meyer said:
Instead of: Chr(13)

Try using:

Chr(13) & Chr(10)

The second syntax can also be: vbCrLf or vbNewLine

Just a Carriage Return [Chr(13)] is insufficient in Windows
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


Pastor Del said:
There must be something wrong with the syntax that i'm not seeing.
 
P

Pastor Del

Thanks guys. But my Chr(13)s were working fine. It turned out to be a
combination of me forgetting to put the asterisks around the file name for
the barcode and the file name being too long to scan. I've got it now,
unfortunately it turns out that the customer's request for emailing the
spreadsheet is a temporary one. Eventually they want me to put the file on
an ftp sight so now I get to research that process.

Thanks again

Arvin Meyer said:
Instead of: Chr(13)

Try using:

Chr(13) & Chr(10)

The second syntax can also be: vbCrLf or vbNewLine

Just a Carriage Return [Chr(13)] is insufficient in Windows
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


Pastor Del said:
There must be something wrong with the syntax that i'm not seeing.


.
 
A

Arvin Meyer [MVP]

You may want to start on the ftp research here:

http://www.mvps.org/access/modules/mdl0015.htm
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


Pastor Del said:
Thanks guys. But my Chr(13)s were working fine. It turned out to be a
combination of me forgetting to put the asterisks around the file name for
the barcode and the file name being too long to scan. I've got it now,
unfortunately it turns out that the customer's request for emailing the
spreadsheet is a temporary one. Eventually they want me to put the file
on
an ftp sight so now I get to research that process.

Thanks again

Arvin Meyer said:
Instead of: Chr(13)

Try using:

Chr(13) & Chr(10)

The second syntax can also be: vbCrLf or vbNewLine

Just a Carriage Return [Chr(13)] is insufficient in Windows
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


Pastor Del said:
There must be something wrong with the syntax that i'm not seeing.

:

I am designing an Excel data report for my customer. The data is
stored
in
Access 2000 so I need to write it into Excel. Everything is working
fine
except the barcode file name I have to put in the right header. My
customer
says they can not scan it. (I use the same barcode in the body of
the
report
and they can scan it.) Here is the code I am using.

ws.PageSetup.RightHeader = "&R&12" & Chr(13) & Chr(13) & strFileName
&
Chr(13) & "&""3 of 9 Barcode""&15strFileName"

strFileName is the file name. Its first occurance, in MS Sans
Serif,
is
readable but when the font changes to 3 of 9 barcode my customer has
problems
scanning. What am I doing wrong?

Perhaps you need a larger barcode font in Excel.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


.


.
 

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