Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 06-16-2014, 12:46 PM
EC37 EC37 is offline NEWB to Macros - formatting exports Windows 7 64bit NEWB to Macros - formatting exports Office 2010 64bit
Advanced Beginner
NEWB to Macros - formatting exports
 
Join Date: May 2014
Location: Waltham, MA
Posts: 56
EC37 is on a distinguished road
Default

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
Reply With Quote
 



Similar Threads
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
NEWB to Macros - formatting exports How to do Formatting Using Macros anju16saini Word VBA 1 03-11-2013 04:15 AM
NEWB to Macros - formatting exports Formatting with macros WaltR Word VBA 8 05-15-2012 06:28 PM
Macros nore Outlook 0 06-01-2011 04:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft