View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Fixed decimals worksheet specific

Are you sure you pasted it in the same worksheet code module that you
entered the data?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Charlotte" wrote in message
...
Ok, I copied and pasted (???) the code to the worksheet. I tried typing

in
1231 and wanted it to be 12.31 but it came out 1231.00 (I have the cells
formatted to 2 decimals; not the fixed, just the formatted). Then I tried

in
a cell that wasn't formatted and it came out 1231. Did I do something

wrong?
--
Charlotte


"Bob Phillips" wrote:

Private Sub Worksheet_Activate()
Application.FixedDecimal = True
End Sub

Private Sub Worksheet_Deactivate()
Application.FixedDecimal = False
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Charlotte" wrote in message
...
I know how to do fixed decimals thru the tools option on the menu, but

is
there a way for it to be worksheet specifi? I don't want all my

worksheet
to
be fixed, just certain ones. Can anyone help?
--
Charlotte