![]() |
#11
|
|||
|
|||
![]()
This is how I have it written, and it keeps saying "Compile error: Sub or Function not defined". It highlights 'Sub Main()' and doesn't even start to perform any of the tasks. For the most part, ignore what I have identified for columns to delete and the rows for jr. Mainly because I am writing this against sample data before i incorporate into the real thing...
Note* I tried to write the 'Set ColorRange = Range' portion exactly as you had it written- even copied and pasted at one point- but it tells me "Compile error: Expected: list separator or )" and highlights the: ":L" portion of what's written. I played around with it, and what i have written below is the only thing it would accept. Code:
Sub Main() Range("E:E,G:G,K:K").Delete Shift:=xlToLeft For jr = 2 To 23 Set ColorRange = Range("A" & jr): L " & jr).Interior" Select Case Range("L" & jr).Value Case "Phase" ColorRange.Interior.ThemeColor = xlThemeColorLight2 ColorRange.Interior.TintAndShade = 0.799981688894314 Case "Sub-Phase" ColorRange.Interior.ThemeColor = xlThemeColorDark1 ColorRange.Interior.TintAndShade = -4.99893185216834E-02 Case Else End Select Next jr End Sub Last edited by macropod; 06-16-2014 at 06:53 PM. Reason: Added code tags & formatting |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formatting contents after Tab of continuous lines or formatting specific area of word | pawii | Word | 1 | 05-12-2014 05:24 AM |
macros | stebrownsword | Word VBA | 0 | 08-28-2013 01:16 AM |
![]() |
anju16saini | Word VBA | 1 | 03-11-2013 04:15 AM |
![]() |
WaltR | Word VBA | 8 | 05-15-2012 06:28 PM |
Macros | nore | Outlook | 0 | 06-01-2011 04:39 PM |