Hi,
I'm still new to macro programming so I would appreciate some help with the following problem:
The Cell H3 (and the following) should be the current date + 6 months
So far I tried this and the I think the mistake must be somewhere in the colored code. The result which is displayed in H3 is 20150612 (and the following lines as well)
Thanks for helping!
Sub UpdateRBPUploadDAte()
Dim NewDateX As String
Dim FutureDateX As String
Worksheets("RBP for Upload").Activate
If ActiveSheet.AutoFilterMode Then
ActiveSheet.AutoFilterMode = False
End If
NewDateX = Date
NewDateX = Format(Date, "yyyymmdd")
Range("G3") = NewDateX
Range("G3").Select
ActiveCell.Copy
Range("G3", Range("G4").End(xlDown).Offset(1, 0)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("G3").End(xlDown).Offset(0, 0).Select
ActiveCell = clearcontent
'FutureDateX = Date
FutureDateX = DateAdd("m", 6, Date)
FutureDateX = Format(Date, "yyyymmdd")
Range("H3") = FutureDateX
Range("H3").Select
ActiveCell.Copy
Range("H3", Range("H4").End(xlDown).Offset(1, 0)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("H3").End(xlDown).Offset(0, 0).Select
ActiveCell = clearcontent
End Sub
Bookmarks