**Increase Font Size for Selected Cell**

S

Shazi

Hi,

I want to make one Button to increase the Font Size for the Selected
Cells in worksheet. I made a macro but it increasing the Font only for
"X9" cell.

Can I make one Tougle button for Zoom In and Zoom Out for the Selected
Cell.
if it possible pls help me.

Sub ZOOM()

Range("X9").Select
With Selection.Font
.Name = "Arial"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Interior
.ColorIndex = 42
.Pattern = xlSolid
End With
End Sub

Regards

shahzad
 
M

Mike H

Hi,

Maybe this

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myrange As Range
Set myrange = UsedRange
myrange.Font.Size = 10
myrange.Interior.ColorIndex = xlNone
Target.Font.Size = 15
Target.Interior.ColorIndex = 42
End Sub

Mike
 
S

Shazi

Hi,

Maybe this

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myrange As Range
Set myrange = UsedRange
myrange.Font.Size = 10
myrange.Interior.ColorIndex = xlNone
    Target.Font.Size = 15
    Target.Interior.ColorIndex = 42
End Sub

Mike









- Show quoted text -

Hi

Dear Mike, thank you its working nice.

Regards.

Shahzad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top