LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.newusers
PJ PJ is offline
external usenet poster
 
Posts: 6
Default vba problem

All

Using formula to check date in a cell when opening workbook. Nb: A1 =
today()
if prior to 01/11/2006 ok no changes if equal to or after the 01/11/2006
then not ok and hide all sheets bar one called contact.

It only works if exact match i.e. if date on sheet is 01/11/2006

If Sheets("Menu").Range("A1") = "01/11/2006" Then hide sheets and reveal
contact The equal sign = being the key

When I try = is grater than or equal to regardless of date (I.e.
31/10/2006 ) still hides sheets!!!

HELP!!!

Private Sub Workbook_Open()
If Sheets("Menu").Range("A1") = "01/11/2006" Then
Sheets(Array("Health Dec", "Menu", "UK", "EU", "XU", "WW", "AT EU", "AT
WW", "Summary") _
).Select
Sheets("Health Dec").Activate
ActiveWindow.SelectedSheets.Visible = False
Sheets("Contact").Visible = True
Sheets("Long stay").Select
ActiveWindow.SelectedSheets.Visible = False
End If
End Sub


 
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
have some problem with database baldamenti Excel Discussion (Misc queries) 1 October 13th 05 05:38 PM
Urgent Help Required on Excel Macro Problem Sachin Shah Excel Discussion (Misc queries) 1 August 17th 05 06:26 AM
Problem With Reference Update Egon Excel Worksheet Functions 17 July 16th 05 05:45 AM
Copy an Drag cell Formula Problem Nat Excel Discussion (Misc queries) 1 June 20th 05 03:24 PM
Freeze Pane problem in shared workbooks JM Excel Discussion (Misc queries) 1 February 1st 05 12:04 AM


All times are GMT +1. The time now is 04:09 PM.

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"