Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 122
Default Code to conditional format all black after date specified in code?

I have a date in cell A100 sheet 1

Can anyone provide a code that will conditionally format an entire
sheet (sheet2) to black fill and font if now() is greater than date in
cell A1?

Or perhaps change sheet 2 to Very Hidden.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Code to conditional format all black after date specified in code?


Try this
Private Sub Worksheet_Change(ByVal Target As Range)
If Now() Sheet1.Range("A100") Then
Sheet2.Visible = xlSheetVeryHidden
Else
Sheet2.Visible = xlSheetVisible
End If
End Sub


--
mikeaj72
------------------------------------------------------------------------
mikeaj72's Profile: http://www.thecodecage.com/forumz/member.php?userid=46
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=44333

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Code to conditional format all black after date specified in code?

One way:

Select all cells in sheet2. Choose Format/Conditional Formatting:

CF1: = $A$1 < NOW()
Format1: <pattern/<black, <font/<black

Note that this will not prevent one from seeing the formula/value in the
formula bar. The user will also be able to, say, on another sheet, enter

A1: =Sheet2!A1

and copy down and across, revealing the values.


In article
,
wx4usa wrote:

Can anyone provide a code that will conditionally format an entire
sheet (sheet2) to black fill and font if now() is greater than date in
cell A1?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 122
Default Code to conditional format all black after date specified incode?

On Dec 26, 12:37*pm, JE McGimpsey wrote:
One way:

Select all cells in sheet2. Choose Format/Conditional Formatting:

CF1: * * = $A$1 < NOW()
Format1: <pattern/<black, <font/<black

Note that this will not prevent one from seeing the formula/value in the
formula bar. The user will also be able to, say, on another sheet, enter

A1: * * *=Sheet2!A1

and copy down and across, revealing the values.

In article
,

*wx4usa wrote:
Can anyone provide a code that will conditionally format an entire
sheet (sheet2) to black fill and font if now() is greater than date in
cell A1?


Thanks, that worked!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Format VB Code for Begins With Marie Bayes Excel Discussion (Misc queries) 5 December 19th 08 05:28 PM
Code Date Format Depending on Computer format Myriam Excel Discussion (Misc queries) 0 July 17th 07 03:26 PM
date format in code TUNGANA KURMA RAJU Excel Discussion (Misc queries) 2 December 26th 05 03:42 AM
Code for Conditional format TUNGANA KURMA RAJU Excel Discussion (Misc queries) 4 November 3rd 05 09:58 AM
Problem with Date format from VBA code twig Excel Discussion (Misc queries) 3 December 7th 04 06:01 PM


All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"