ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   **Increase Font Size for Selected Cell** (https://www.excelbanter.com/excel-programming/414049-%2A%2Aincrease-font-size-selected-cell%2A%2A.html)

Shazi

**Increase Font Size for Selected Cell**
 
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

Mike H

**Increase Font Size for Selected Cell**
 
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

"Shazi" wrote:

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


Shazi

**Increase Font Size for Selected Cell**
 
On Jul 15, 12:37*pm, Mike H wrote:
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



"Shazi" wrote:
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- Hide quoted text -


- Show quoted text -


Hi

Dear Mike, thank you its working nice.

Regards.

Shahzad


All times are GMT +1. The time now is 06:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com