This is my code:
Dim ValDate As String
Dim FName As String
Dim rows As Integer
Dim col As Integer
ValDate = InputBox("Enter cell range:")
If ValDate = "" Then
Exit Sub
End If
r = 1
c = 20
rows = Range(ValDate).Row
col = Range(ValDate).Column
FName = InputBox("Enter name:")
Range("B2:G22").Select
Selection.Copy
Range(ValDate).Select
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Paste
Range(ValDate).Offset(0, 1) = FName
With Range(Cells(rows, col), Cells(rows + c, col)).Offset(1, 0)
.Replace "ABCDE", FName
End With
With Range(Cells(rows, col), Cells(rows + c, col)).Offset(1, 1)
.Replace "ABCDE", FName
End With
With Range(Cells(rows, col), Cells(rows + c, col)).Offset(1, 3)
.Replace "ABCDE", FName
End With
Problem is when macro trying to Replace word. Nothing happen. Yesterday I was working on this and all was good. Today I tried to continue work on this macro and run for test. Nothing. Can someone explain why? I haven't changed anything. No errors when I run macro. Just reading code and skips it.