Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub CommandButton5_Click()
- projname = Range("E17")
- projnum = Range("E19")
- Dim obook As Workbook
- Set obook = Workbooks(Replace(projname, " ", "") + ".xlsx")
- obook.Activate
- ActiveSheet.Range("A99") = 6
- counter = ActiveSheet.Range("A99").Value
- If counter Mod 2 <> 0 Then
- With ActiveSheet.Range(Cells(globalcounter, 1), Cells(globalcounter, 8)).Interior
- .Pattern = xlSolid
- .PatternColorIndex = xlAutomatic
- .ThemeColor = xlThemeColorAccent5
- .TintAndShade = 0.599993896298105
- .PatternTintAndShade = 0
- End With
- Else
- With ActiveSheet.Range(Cells(globalcounter, 1), Cells(globalcounter, 8)).Interior
- .Pattern = xlSolid
- .PatternColorIndex = xlAutomatic
- .ThemeColor = xlThemeColorAccent5
- .TintAndShade = 0.799981688894314
- .PatternTintAndShade = 0
- End With
- End If
- counter = counter + 1
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement