Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Return to todays date macro

I need some help with the following code that will select the cell in column
B that contains todays date, there are no duplicate dates. If todays date is
13 Jul 09, after performing the code below, the cell with todays date is
selected and visable on the screeen. Found some code that should have
worked, but not smart enough to integrate them.

A=Locked or Not Locked or "" or 30
B=Date
C=TEXT(B_,"ddd")
D, E, F, H, I =numbers
H=%

Sub LockedNotLocked()
ActiveSheet.Unprotect
Dim rng As Range
For Each rng In Range("A35:A494")
If rng.Value = "Not Locked" Then
Range("B" & rng.Row & ":I" & rng.Row).Value = Range("B" & rng.Row &
":I" & rng.Row).Value
End If
Next rng
ActiveSheet.Protect
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Return to todays date macro

Try the below code in a new workbook/sheet...which should select todays date.

Sub FindToday()
Range("B:B").Find(Date).select
End Sub

I am not sure about the code which you pasted below.. which unprotect the
active sheet..

If this post helps click Yes
---------------
Jacob Skaria


"usmc-r70" wrote:

I need some help with the following code that will select the cell in column
B that contains todays date, there are no duplicate dates. If todays date is
13 Jul 09, after performing the code below, the cell with todays date is
selected and visable on the screeen. Found some code that should have
worked, but not smart enough to integrate them.

A=Locked or Not Locked or "" or 30
B=Date
C=TEXT(B_,"ddd")
D, E, F, H, I =numbers
H=%

Sub LockedNotLocked()
ActiveSheet.Unprotect
Dim rng As Range
For Each rng In Range("A35:A494")
If rng.Value = "Not Locked" Then
Range("B" & rng.Row & ":I" & rng.Row).Value = Range("B" & rng.Row &
":I" & rng.Row).Value
End If
Next rng
ActiveSheet.Protect
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Return to todays date macro

How would I integrate your code into mine?
Or
How would I 'call' your code from within my code?

"Jacob Skaria" wrote:

Try the below code in a new workbook/sheet...which should select todays date.

Sub FindToday()
Range("B:B").Find(Date).select
End Sub

I am not sure about the code which you pasted below.. which unprotect the
active sheet..

If this post helps click Yes
---------------
Jacob Skaria


"usmc-r70" wrote:

I need some help with the following code that will select the cell in column
B that contains todays date, there are no duplicate dates. If todays date is
13 Jul 09, after performing the code below, the cell with todays date is
selected and visable on the screeen. Found some code that should have
worked, but not smart enough to integrate them.

A=Locked or Not Locked or "" or 30
B=Date
C=TEXT(B_,"ddd")
D, E, F, H, I =numbers
H=%

Sub LockedNotLocked()
ActiveSheet.Unprotect
Dim rng As Range
For Each rng In Range("A35:A494")
If rng.Value = "Not Locked" Then
Range("B" & rng.Row & ":I" & rng.Row).Value = Range("B" & rng.Row &
":I" & rng.Row).Value
End If
Next rng
ActiveSheet.Protect
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Return to todays date macro


Got it working! Thanks for your quick and accurate help!
"Jacob Skaria" wrote:

Try the below code in a new workbook/sheet...which should select todays date.

Sub FindToday()
Range("B:B").Find(Date).select
End Sub

I am not sure about the code which you pasted below.. which unprotect the
active sheet..

If this post helps click Yes
---------------
Jacob Skaria


"usmc-r70" wrote:

I need some help with the following code that will select the cell in column
B that contains todays date, there are no duplicate dates. If todays date is
13 Jul 09, after performing the code below, the cell with todays date is
selected and visable on the screeen. Found some code that should have
worked, but not smart enough to integrate them.

A=Locked or Not Locked or "" or 30
B=Date
C=TEXT(B_,"ddd")
D, E, F, H, I =numbers
H=%

Sub LockedNotLocked()
ActiveSheet.Unprotect
Dim rng As Range
For Each rng In Range("A35:A494")
If rng.Value = "Not Locked" Then
Range("B" & rng.Row & ":I" & rng.Row).Value = Range("B" & rng.Row &
":I" & rng.Row).Value
End If
Next rng
ActiveSheet.Protect
End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Return to todays date macro

Thanks. So that means you have got what you are looking for?

If this post helps click Yes
---------------
Jacob Skaria


"usmc-r70" wrote:


Got it working! Thanks for your quick and accurate help!
"Jacob Skaria" wrote:

Try the below code in a new workbook/sheet...which should select todays date.

Sub FindToday()
Range("B:B").Find(Date).select
End Sub

I am not sure about the code which you pasted below.. which unprotect the
active sheet..

If this post helps click Yes
---------------
Jacob Skaria


"usmc-r70" wrote:

I need some help with the following code that will select the cell in column
B that contains todays date, there are no duplicate dates. If todays date is
13 Jul 09, after performing the code below, the cell with todays date is
selected and visable on the screeen. Found some code that should have
worked, but not smart enough to integrate them.

A=Locked or Not Locked or "" or 30
B=Date
C=TEXT(B_,"ddd")
D, E, F, H, I =numbers
H=%

Sub LockedNotLocked()
ActiveSheet.Unprotect
Dim rng As Range
For Each rng In Range("A35:A494")
If rng.Value = "Not Locked" Then
Range("B" & rng.Row & ":I" & rng.Row).Value = Range("B" & rng.Row &
":I" & rng.Row).Value
End If
Next rng
ActiveSheet.Protect
End Sub

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
Macro to goto specific cell (todays date) crimekilla Excel Discussion (Misc queries) 4 May 11th 10 04:42 PM
macro to: Add new sheet, then rename new sheet with todays date Paul Excel Worksheet Functions 3 September 29th 07 03:17 AM
how can I return todays date (today() ) in an if function Sally Excel Worksheet Functions 6 May 8th 06 12:55 PM
Using macro to save as todays date Momo Excel Programming 5 January 26th 05 06:09 PM
What syntax do I use to add todays date in an excel macro Skeatt Excel Programming 3 January 11th 05 01:59 AM


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

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

About Us

"It's about Microsoft Excel"