Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Here is one, incredibly convoluted way
Dim saveValue Dim saveFormat With Range("A1") saveValue = .Value saveFormat = .NumberFormat .Value = TextBox4.Text - 1 / 8 .NumberFormat = "#??/??" If ListBox2.Value = "H.W.R." Then Label17.Caption = Format(TextBox4.Text - 1 / 8, "#??/??") Else Label17.Caption = TextBox4.Text + 1 / 8 End If .Value = saveValue .NumberFormat = saveFormat End With -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "damorrison" wrote in message ups.com... I have a formula in VBA that is calculated and displayed in a Label, and then inserted into a cell, I cannot get the darned thing to display as a Fraction or get it formatted into the cell as a fraction Here is the formula Private Sub ListBox2_Change() If ListBox2.Value = "H.W.R." Then Label17.Caption = TextBox4.Text - 1 / 8 Else Label17.Caption = TextBox4.Text + 1 / 8 End If End Sub Any Ideas |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Limited fraction cell format | Excel Discussion (Misc queries) | |||
how do i replace ( with / without changing format to fraction | Excel Worksheet Functions | |||
Keep custom format in new worksheet | Excel Discussion (Misc queries) | |||
How to format a date to a different format | Excel Discussion (Misc queries) | |||
Copying a conditional format | Excel Worksheet Functions |