PDA

View Full Version : VBA - seet 1 cell value (H2) to copy paste in activecell column c sheet 2



Mawar5530
04-07-2021, 10:11 AM
Sub ShowCal()


Dim myDate As Date
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Report")
Set sw = Worksheets("Input")

iRow = ws.Cells.Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1


myDate = CalendarForm.GetDate(FirstDayOfWeek:=Monday, SaturdayFontColor:=RGB(250, 0, 0), SundayFontColor:=RGB(250, 0, 0))
If myDate > 0 Then Range("h152").Value = myDate
ws.Cells(iRow, 7).Value = sw.Range("m2").Value28261