5,174
社区成员
发帖
与我相关
我的任务
分享
Sub Macro1()
Dim myLength As Long
Dim todayLen As Long
Dim myRate As Double
Dim startDay As Date
Dim deadLine As Date
startDay = Cells(2, 3)
deadLine = Cells(2, 4)
myLength = 250
myRate = (Date - startDay) / (deadLine - startDay)
todayLen = myRate * myLength
With ActiveSheet.Shapes("Line 1")
.Width = todayLen
End With
End Sub
Selection.ShapeRange.Item("Line 1").Width = 141.75