Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Formatting from VBE

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formatting from VBE


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


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


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




for example.


pls123;696870 Wrote:

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



--
aflatoon

Regards,
A.
------------------------------------------------------------------------
aflatoon's Profile: 1501
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=194853

http://www.thecodecage.com/forumz

  #3   Report Post  
Posted to microsoft.public.excel.programming
om om is offline
external usenet poster
 
Posts: 18
Default Formatting from VBE

Try

Selection.NumberFormat = "0.00"


"pls123" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Formatting from VBE

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.

pls123 wrote:

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


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 464
Default Formatting from VBE

Record a macro formatting your
--
Regards
Dave Hawley
www.ozgrid.com selection.



"pls123" wrote in message
...
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


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
Conditional formatting--different formatting depending on cell con Tammy S. Excel Discussion (Misc queries) 3 March 30th 09 08:11 PM
Find formatting in text in cell, insert tags around formatting. CarlC Excel Programming 2 February 27th 08 09:26 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
expanding custom formatting without removing existing cell formatting? Keith Excel Worksheet Functions 3 December 27th 06 01:54 PM
Decimal Formatting in Windows English vs European Formatting Drummer361 Excel Programming 3 August 7th 06 02:48 PM


All times are GMT +1. The time now is 12:05 PM.

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"