fonts invisible

jefflee

Board Regular
Joined
Jun 8, 2015
Messages
79
Hi, there
after ransacking the web for a long time . I cannot find the code to make the font invisible/
question : is it possible to write a code to make fonts invisible ?

thanks
 

Some videos you may like

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,389
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Try:
Code:
Range("A1:A10").font.color=Range("A1:A10").Interior.Color
change the range to suit.
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,697
Office Version
  1. 2010
Platform
  1. Windows
As long as your cells are not displaying any error values (#VALUE!, #N/A, etc.), you can select the cells and Custom Format them using this...

;;;

If you need VBA code, this line of code will do the same thing...

Range("A1:A10").NumberFormat = ";;;"

Change the range as necessary.
 

jefflee

Board Regular
Joined
Jun 8, 2015
Messages
79

ADVERTISEMENT

Thanks,
done.
working on making the fonts in the text box invisible.
could you give a hand ?
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,697
Office Version
  1. 2010
Platform
  1. Windows
working on making the fonts in the text box invisible.
could you give a hand ?
Where is the TextBox located at... on a UserForm or on a worksheet? If it is on a worksheet, is it an ActiveX TextBox or a Forms TextBox (from the Insert tab/Text panel on the Ribbon)?
 

jefflee

Board Regular
Joined
Jun 8, 2015
Messages
79

ADVERTISEMENT

hi , this is my code

If Cells(4, 42) = 1 Then

ActiveSheet.Shapes("scale1").Select
With Selection
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.Visible = msoTrue
End With

ActiveSheet.Shapes("scale1b").Select
With Selection
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.Visible = msoFalse

ActiveSheet.Shapes("num1").Select

With Selection
.ColorIndex = Interior.Color
End With


End If
End Sub


my objective is to make the text in shape num1 invisible.
but error occurs
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,697
Office Version
  1. 2010
Platform
  1. Windows
hi , this is my code

If Cells(4, 42) = 1 Then

ActiveSheet.Shapes("scale1").Select
With Selection
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.Visible = msoTrue
End With

ActiveSheet.Shapes("scale1b").Select
With Selection
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.Visible = msoFalse

ActiveSheet.Shapes("num1").Select

With Selection
.ColorIndex = Interior.Color
End With


End If
End Sub


my objective is to make the text in shape num1 invisible.
but error occurs
Try replacing the highlighted line of code with this...

.TextFrame.Characters.Font.Color = .Fill.BackColor
 

jefflee

Board Regular
Joined
Jun 8, 2015
Messages
79
Thanks Rick,

it just highlighted with yellow and no message error show.
try many times.
is it the matter of version ? i use 2003

Thanks thanks
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,697
Office Version
  1. 2010
Platform
  1. Windows
Thanks Rick,

it just highlighted with yellow and no message error show.
try many times.
is it the matter of version ? i use 2003
I don't know... I use XL2010 and the code I posted worked fine for me when I tested it prior to posting it. Maybe one of the properties I used was not available in XL2003... that would explain the error you are reporting.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,970
Messages
5,599,106
Members
414,287
Latest member
Rbwester

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top