Hi There,
I have a Gantt chart scheduler and put "Today" flag to represent in the current month the flag will show on the current day.
The formula for this is:CurrDay = Day(Date)
'Set Current Day Marker
.Shapes("TodayGrp").Left = .Cells(6, CurrDay + 7).Left '
If Month(Date) <> .Range("B3").Value Then .Shapes("TodayGrp").Visible = msoFalse Else: .Shapes("TodayGrp").Visible = msoCTrue
I have also a Previous and Next month button. with the formula If Month(Date) <> .Range("B3").Value Then .....Visible false because if the prev month "August" the Flag will disapear which is correct. When you go back to September it reappears - which is correct.
But because the VBA Formula is Else: .Shapes("TodayGrp").Visible = msoCTrue anything more than September the flag will still be present in Oct +
Is there any other way of representing a flag or is there a way to highlight a column representing "Today" or maybe a Strike of some sort????
This is quite a melon scratcher for me Ive tried various way but no success
I hand you the workbook attached
Thanks
Steve behr
Hi Steven,
You have to specify all possible scenarios to view or hide that shape, If-Then-Else might not be enough. use ElseIf:
If Month(Date) <> .Range("B3").Value Then
.Shapes("TodayGrp").Visible = msoFalse
ElseIf condition 2
.Shapes("TodayGrp").Visible = msoCTrue
ElseIf condition 3
.Shapes("TodayGrp").Visible = msoCTrue
Else
...
End if
Very Good Catalin,
That works well, thats great.
Been annoying me for 3 weeks!
Thanks
Steve