Hi all.
Disclaimer: I am still relatively new to vba
I am trying to create a calendar overview, a Gantt diagram of sorts (see attached picture). I have 1 column of dates in the format of dd-mm and next to it a column of duration of each activity in days (integer value).
The calendar overview is divided in to different sections with different color coding. For each section I wish to have a vba code selecting a horisontal selection of cells, defined as the starting date + duration. Then, I would like to fill color this line with a certain color (unknown at this point).
What I have done so far is this:
Whenever I run this, I get a "type mismatch" error.
If you can provide me with some help I would be grateful.
Disclaimer: I am still relatively new to vba
I am trying to create a calendar overview, a Gantt diagram of sorts (see attached picture). I have 1 column of dates in the format of dd-mm and next to it a column of duration of each activity in days (integer value).
The calendar overview is divided in to different sections with different color coding. For each section I wish to have a vba code selecting a horisontal selection of cells, defined as the starting date + duration. Then, I would like to fill color this line with a certain color (unknown at this point).
What I have done so far is this:
VBA Code:
sub CalOver ()
Dim Section1 As Range
Dim duration1 As Range
Set Section1 = Worksheets("Tender Schedule").Range("E10:E21")
Set duration1 = Worksheets("Tender Schedule").Range("F10:F21")
Range(Section1.Offset(0, duration1)).Select.Interior.Color = 49397
end sub
Whenever I run this, I get a "type mismatch" error.
If you can provide me with some help I would be grateful.