stuck with my code !!

  • Thread starter Thread starter Anthony
  • Start date Start date
A

Anthony

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top