Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Char() in Macro

Hello,
I built a system that generate invoice number.
Now it work on excel , and i want to convert it to macro in vba.
My problem is that you can't use char() in vba.
I need the generator to generate number of invoice with the date the
day and A,B,C............ I give an exmpale:
Lets say I did three invoices on the date 11/8/04, the invoice genrate
will give me :
1) 040811
2) 040811A
3) 040811B

For now i use in excel : =TEXT(TODAY(),"yymmdd") & Char(65)

Thanks for your help..........


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Using Char() in Macro

Use the Chr() function. E.g.,

Dim S As String
S = Format(Now,"yymmdd") & Chr(65)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"slideman " wrote in
message ...
Hello,
I built a system that generate invoice number.
Now it work on excel , and i want to convert it to macro in

vba.
My problem is that you can't use char() in vba.
I need the generator to generate number of invoice with the

date the
day and A,B,C............ I give an exmpale:
Lets say I did three invoices on the date 11/8/04, the invoice

genrate
will give me :
1) 040811
2) 040811A
3) 040811B

For now i use in excel : =TEXT(TODAY(),"yymmdd") & Char(65)

Thanks for your help..........


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Char() in Macro

Thanks Alot, it help me very muc

--
Message posted from http://www.ExcelForum.com

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
char() oldLearner57 Excel Discussion (Misc queries) 4 July 17th 08 10:42 AM
FIND 1 char in cell of any 3 char =True Nastech Excel Discussion (Misc queries) 5 April 26th 08 02:17 PM
Can excel macro access SUBstring individual 'char' level? If so how? bxc2739 Excel Discussion (Misc queries) 1 April 25th 06 03:58 PM
8500 cells with phone number(7 char.), wishing to add area code (10 char.) [email protected] Excel Discussion (Misc queries) 6 March 10th 06 05:13 PM
CHAR(10) JJ Excel Worksheet Functions 4 April 4th 05 10:46 PM


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