![]() |
stuck with my code !!
Hi all,
I have started with some code, but am now stuck. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(False, False) = "F8" Then Select Case Target.Value Case "Edit report" ShiftReport Now this is where I get stuck The 'ShiftReport' code should carry out the following... Check if today's date - formatted as dddd dd mmmm yyyyy - Tuesday 29 July 2008 - is found through range A2:A1000 of ReportDatabase sheet. I beleive this range is a text string and not actually a date though If it is then Code: frmEditReport.showif it isn't then Code: frmReport.show Think thats it - any help appreciated |
stuck with my code !!
On Tue, 29 Jul 2008 11:02:00 -0700, Anthony
wrote: Now this is where I get stuck The 'ShiftReport' code should carry out the following... Check if today's date - formatted as dddd dd mmmm yyyyy - Tuesday 29 July 2008 - is found through range A2:A1000 of ReportDatabase sheet. I beleive this range is a text string and not actually a date though If it is then Sub ShiftReport() Dim rFound As Range Set rFound = Sheet1.Range("A2:A1000").Find _ (Format(Date, "dddd dd mmmm yyyy"), , xlValues, xlWhole) If rFound Is Nothing Then frmEditReport.Show Else frmReport.Show End If End Sub -- Dick Kusleika Microsoft MVP-Excel http://www.dailydoseofexcel.com |
All times are GMT +1. The time now is 01:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com