T
thomsonpa
Can anybody help explain why the following code does not work?
The value in range D2 is =TEXT($C$2,"DDDDDD"), c2 is todays date
Dim rng As Range
Set rng = ActiveSheet.Range("D2")
With rng
If .Value = "MONDAY" Then
'Do something,
'
Sheets("MON").Select
ActiveSheet.Rows("7:126").Select
Selection.Copy
Sheets("24HR").Select
ActiveSheet.Rows("7:126").Select
ActiveSheet.Paste
Else
If .Value = "TUESDAY" Then
'Do something,
'
Sheets("TUE").Select
ActiveSheet.Rows("7:126").Select
Selection.Copy
Sheets("24HR").Select
ActiveSheet.Rows("7:126").Select
ActiveSheet.Paste
Else
If .Value = "WEDNESDAY" Then
'Do something,
'
Sheets("WED").Select
ActiveSheet.Rows("7:126").Select
Selection.Copy
Sheets("24HR").Select
ActiveSheet.Rows("7:126").Select
ActiveSheet.Paste
Else
End If
End If
End If
End With
The value in range D2 is =TEXT($C$2,"DDDDDD"), c2 is todays date
Dim rng As Range
Set rng = ActiveSheet.Range("D2")
With rng
If .Value = "MONDAY" Then
'Do something,
'
Sheets("MON").Select
ActiveSheet.Rows("7:126").Select
Selection.Copy
Sheets("24HR").Select
ActiveSheet.Rows("7:126").Select
ActiveSheet.Paste
Else
If .Value = "TUESDAY" Then
'Do something,
'
Sheets("TUE").Select
ActiveSheet.Rows("7:126").Select
Selection.Copy
Sheets("24HR").Select
ActiveSheet.Rows("7:126").Select
ActiveSheet.Paste
Else
If .Value = "WEDNESDAY" Then
'Do something,
'
Sheets("WED").Select
ActiveSheet.Rows("7:126").Select
Selection.Copy
Sheets("24HR").Select
ActiveSheet.Rows("7:126").Select
ActiveSheet.Paste
Else
End If
End If
End If
End With