Hi guys, I'm just learning the ropes with macro's and their coding and am struggling with a small issue on how to implement the format change on my selected cells.
For example I have this simple merge and centre macro but how do i modify the coding to implement the change on the active cell selection, as the code below has the set "Range("E39:F39").Select"
Sub Merge_centre()
'
' Merge_centre Macro
'
' Keyboard Shortcut: Ctrl+m
'
Range("E39:F39").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.merge
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
End Sub
Bookmarks