Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open worksheet at specific cell | Excel Discussion (Misc queries) | |||
Find specific worksheet in another workbook and then applu Vlookup | Excel Worksheet Functions | |||
Comparing a list to a Calendar worksheet. | Excel Worksheet Functions | |||
fixed decimals | Excel Worksheet Functions | |||
Hyperlink to specific worksheet in Excel | Links and Linking in Excel |