Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 06-12-2014, 07:23 AM
BobBridges's Avatar
BobBridges BobBridges is offline NEWB to Macros - formatting exports Windows 7 64bit NEWB to Macros - formatting exports Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Ok, now I'm looking at that second section. There are a number of recorded actions here that I take it are not necessary to the work: you scroll left twice, and you zoom out a bit, both so you can see the data you want to work with. But when we transfer this to VBA, the program doesn't need to look at the data—or rather it doesn't need to have the cells in the window in order to look at them. The part that matters for your program is this:
Code:
  Range("A2:L11,A43:L43,A103:L103,A134:L145,A186:L25 4").Select
  With Selection.Interior
    .PatternColorIndex = xlAutomatic
    .ThemeColor = xlThemeColorLight2
    .TintAndShade = 0.799981688894314
    .PatternTintAndShade = 0
    End With
  Range("A12:L25,A44:L94,A104:L118,A146:L181,A255:L2 61").Select
  With Selection.Interior
    .PatternColorIndex = xlAutomatic
    .ThemeColor = xlThemeColorDark1
    .TintAndShade = -4.99893185216834E-02
    .PatternTintAndShade = 0
    End With
The part that sets the formatting would stay the same, presumably; what you need in your code (right?) is some way of identifying automatically the ranges you want to work with, instead of you having to inspect them and set them manually. So here's the first working question: Why did you select those ranges? Will your program be looking for the word "Totals:" in A25, A94, A118 and so on, or what? What's the definition?
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 07:36 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