Thread: Macro??
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Connie Martin Connie Martin is offline
external usenet poster
 
Posts: 251
Default Macro??

Thank you for responding. I get an error when I enable macros. VB opens up
with this pop-up: "Compile error: Syntax error" and this line is
highlighted: ..Interior.ColorIndex = xlNone

But as mentioned to Stefi, maybe just having the date in col. A coloured
will be sufficient. Thank you. Connie

"Don Guillett" wrote:

Place this in the ThisWorkbook module. Normally, I do NOT like selections
but you want to got there.
Change cl J to suit & color 6 to suit

Private Sub Workbook_Open()
Sheets("sheet1").Select
With ActiveSheet.Columns("j")
..Interior.ColorIndex = xlNone
..Find(CStr(Date), LookIn:=xlFormulas, LookAt:=xlWhole, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Select
Selection.Interior.ColorIndex = 6
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Connie Martin" wrote in message
...
I'm sure this can be done. Excel can do just about anything. Only wish I
could!! My spreadsheet has dates in Col. A, which are formatted as Date.
Each day when I open the file, I would like Excel to automatically (via a
macro, I presume) colour the row for today in pink, remove the colour pink
from last business day's row, and then end by selecting the date for
today.
So, today it would've removed the colour from row 5, which was Friday
(weekends have been excluded from this spreadsheet), and then would've
coloured row 6 pink and then select A6. I would like this macro to run
when
the spreadsheet is opened. Can this be done? Please note: there are
other
coloured cells and rows in this spreadsheet that I don't want the macro to
mess with. Thank you. Connie