Formatting from VBE

P

pls123

Hello all !
I need to format a cell from VBE...
it must formattes as number with 2 decimals..

then i will insert in my work..
help me please !!
byee
 
A

aflatoon

You can set a cell's number format in VBA:


Code:
--------------------


Range("A1").Numberformat = "0.00"
--------------------




for example.


pls123;696870 said:
Hello all !
I need to format a cell from VBE...
it must formattes as number with 2 decimals..

then i will insert in my work..
help me please !!
byee
 
D

Dave Peterson

A lot of times, it's easiest to record a macro and change the format. Then stop
recording and just steal the code you need.

If I'm gonna do lots of recording, sometimes I'll even start a test workbook and
record in there so that I don't damage anything important.
 

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