M
Michael
I am writing a simple macro that turns on or off the horizontal
Gridlines-Gantt Rows in the Gantt Chart view. I can turn them on and off
using two separate macros. However, what I would like do is create one macro
so I can attach it to one icon that will then toggle the lines on and off.
The macro below will address the NormalType variable in the first if
statement, but I can't get it to address the NormalType in the ElseIf
statement. I have tried several different variations and none of them work.
If NormalType = 0 Then 'If lines are off, turn them on.
GridlinesEdit Item:=0, NormalType:=1
GridlinesEdit Item:=0, NormalColor:=15
ElseIf NormalType <> 0 Then 'If lines are on, turn them off.
GridlinesEdit Item:=0, NormalType:=0
GridlinesEdit Item:=0, NormalColor:=16
End If
Gridlines-Gantt Rows in the Gantt Chart view. I can turn them on and off
using two separate macros. However, what I would like do is create one macro
so I can attach it to one icon that will then toggle the lines on and off.
The macro below will address the NormalType variable in the first if
statement, but I can't get it to address the NormalType in the ElseIf
statement. I have tried several different variations and none of them work.
If NormalType = 0 Then 'If lines are off, turn them on.
GridlinesEdit Item:=0, NormalType:=1
GridlinesEdit Item:=0, NormalColor:=15
ElseIf NormalType <> 0 Then 'If lines are on, turn them off.
GridlinesEdit Item:=0, NormalType:=0
GridlinesEdit Item:=0, NormalColor:=16
End If