question

MawarSintaMadar-9497 avatar image
0 Votes"
MawarSintaMadar-9497 asked

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

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").Value

End Sub85404-555.jpg


office-vba-dev
555.jpg (35.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers