J
jimmy
Hi all,
There is only one sheet in my workbook, a cell in that sheet usually
assigned a date value - NOW(in coding, not the formula =NOW()). I wrote some
codes for changing different rows background color according to that date
(weekday). For testing purpose, sometimes I manually change the date in that
cell.
My problem is, my intention is write the code:
Sheets("ABC").Range("S1") = Now
in the Workbook open function and write the changing color code in the sheet
activate function. But it didn't work. Now, I have written two set of code
that one in the Workbook open function (date for now) and one in the
commandbutton in the sheet (press that button to get the cell "S1" value and
do the same thing). How can I do it for only has one set of code so easier
for amendment?
Furthermore, how to declare a function and what is the keyword for calling
that function?
Thank you.
There is only one sheet in my workbook, a cell in that sheet usually
assigned a date value - NOW(in coding, not the formula =NOW()). I wrote some
codes for changing different rows background color according to that date
(weekday). For testing purpose, sometimes I manually change the date in that
cell.
My problem is, my intention is write the code:
Sheets("ABC").Range("S1") = Now
in the Workbook open function and write the changing color code in the sheet
activate function. But it didn't work. Now, I have written two set of code
that one in the Workbook open function (date for now) and one in the
commandbutton in the sheet (press that button to get the cell "S1" value and
do the same thing). How can I do it for only has one set of code so easier
for amendment?
Furthermore, how to declare a function and what is the keyword for calling
that function?
Thank you.