Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Fixed decimals worksheet specific

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Fixed decimals worksheet specific

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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Fixed decimals worksheet specific

Stick this code into the specific worksheet(s)

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

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

This is event code and goes into the sheet module.

Right-click on a sheet tab and "View Code"

Copy and paste the code into that module.


Gord Dibben MS Excel MVP

On Tue, 12 Sep 2006 13:54:02 -0700, Charlotte
wrote:

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?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Fixed decimals worksheet specific

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




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Fixed decimals worksheet specific

And don't forget it is sheet_activate code.

After pasting the code into the module, you must switch to another sheet then
re-select(activate) the sheet to get fixed decimals.


Gord


On Wed, 13 Sep 2006 15:15:54 +0100, "Bob Phillips"
wrote:

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


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Fixed decimals worksheet specific

Yep. Checked the code and it's still there. I have only one sheet in the
worksheet. Do I still select "fixed decimal" from the option menu? I got a
message when I went into the sheet saying I encountered an error because of
several security reasons. I went into tools/macro/security and set to
medium. Closed the file and then opened it again and selected "enable", but
still didn't work.

Thanks for the help anyway. Maybe it's something in the file.

Charlotte


"Bob Phillips" wrote:

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






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Fixed decimals worksheet specific

Thanks, but still didn't work. Got an error when I first went into the file
about security. Tried changing level to medium (as was suggested) then
close, reopen and select enable, but still didn't work.

Must be something about the file or what I'm doing. Thanks anyway.
--
Charlotte


"Gord Dibben" wrote:

And don't forget it is sheet_activate code.

After pasting the code into the module, you must switch to another sheet then
re-select(activate) the sheet to get fixed decimals.


Gord


On Wed, 13 Sep 2006 15:15:54 +0100, "Bob Phillips"
wrote:

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



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
Open worksheet at specific cell Rob Excel Discussion (Misc queries) 5 August 23rd 06 12:19 AM
Find specific worksheet in another workbook and then applu Vlookup Salman Excel Worksheet Functions 0 March 22nd 06 08:03 AM
Comparing a list to a Calendar worksheet. PatrickL Excel Worksheet Functions 0 August 25th 05 04:21 PM
fixed decimals GreenThumb Excel Worksheet Functions 7 April 15th 05 12:35 AM
Hyperlink to specific worksheet in Excel Glenn Mulno Links and Linking in Excel 2 February 7th 05 06:01 PM


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