Conditional Formatting Macro

D

dok112

Hi,

I created a macro that creates conditional formatting when i select a
certain cell range. I want to automate the whole process due to having
several different cells to modify in a seperate data sheet. When I
recorded the process, it didn't record the whole process, so I am at a
loss right now. I want to run the macro in a different spreadsheet
(the data sheet). Below is one of my current macros. When this is
run, it creates a button that I want to press that runs a macro in the
data sheet which uses CF and toolbar buttons. Any ideas??

Sub TLD_1()

Application.Run "'Productivity Report Generator.xls'!TLD1"
ActiveSheet.Shapes("Button 28").Select
Selection.OnAction = "AHT"

ActiveSheet.Shapes("Button 28").Select
Selection.Characters.Text = "Your Productivity Report"
With Selection.Characters(Start:=1, Length:=24).Font
..Name = "Georgia"
..FontStyle = "Regular"
..Size = 10
..Strikethrough = False
..Superscript = False
..Subscript = False
..OutlineFont = False
..Shadow = False
..Underline = xlUnderlineStyleNone
..ColorIndex = xlAutomatic
End With
ActiveCell.Select
End Sub
 
D

dok112

Sorry, I read what i posted and it didnt make much sense to me, so I'l
try to redescribe what I'm wanting to do. I have a button that runs
macro that creates a new toolbar with 6 other macros associated, i
also creates a button on the main page that I want to create a ne
macro for. This macro I want to create will apply to anothe
spreadsheet that is open. For ex. Cell's A1:A8 is a series of data.
want the macro to run the 1st macro button on the toolbar on tha
series, then I want it to run the 2nd macro button on series B1:B8 an
so forth. When I tried to record the macro, it didn't record any o
the conditional formatting that the macro buttons provided. Any idea'
how to fix this and make it work? if it possible? Thanks for all you
help
 
B

Bob Flanagan

Go to the worksheet to be modified and then run

Range("a1:a8").select
MacroNameofFirstMacroToRun
Range("b1:b8").select
MacroNameOfSecondMacroToRun

and so forth.

Excel does not record the calling of macros from buttons in the macro
recorder, thus the results you saw.

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top