Alvinkiang
07-24-2006, 02:02 AM
i wanted to schedule the date entered in the form accordingly with colorfill on the worksheets. i am done with the date split and i am also done with the opening of the right worksheet for month. but i am having problems with the day. how can i get the days to be on the right cells? i dun know how to let the system detect the days from the worksheet and color the correct cells with color. can anyone pls help mi?? thanks
i have attached the worksheet of my schedule to let ur see how it looks like.
Below are my coding for date split and opening of the right month and place the EquidID on the cells. how to go about tracking the day and fill the cells with color??
Dim StoredCmd() As String
Dim myValue1 As Variant
Dim myValue2 As Variant
Dim myValue3 As Variant
Dim temp5 As String
temp5 = txtSchedule.Value
StoredCmd = Split(temp5, "/")
myValue1 = (StoredCmd(0)) ' mm
myValue2 = (StoredCmd(1)) ' dd
myValue3 = (StoredCmd(2)) ' yyyy
With Workbooks("PM_Schedule.xls")
.Activate
If (myValue1 = 1) Then
Worksheets("Jan").Activate
ElseIf (myValue1 = 2) Then
Worksheets("Feb").Activate
ElseIf (myValue1 = 3) Then
Worksheets("Mar").Activate
ElseIf (myValue1 = 4) Then
Worksheets("Apr").Activate
ElseIf (myValue1 = 5) Then
Worksheets("May").Activate
ElseIf (myValue1 = 6) Then
Worksheets("Jun").Activate
ElseIf (myValue1 = 7) Then
Worksheets("July").Activate
ElseIf (myValue1 = 8) Then
Worksheets("Aug").Activate
ElseIf (myValue1 = 9) Then
Worksheets("Sept").Activate
ElseIf (myValue1 = 10) Then
Worksheets("Oct").Activate
ElseIf (myValue1 = 11) Then
Worksheets("Nov").Activate
ElseIf (myValue1 = 12) Then
Worksheets("Dec").Activate
Else
MsgBox ("not in the 12 month")
End If
find_empty_cell ("A5")
Selection.Cells.Offset(1, 0) = txtEquidID
i have attached the worksheet of my schedule to let ur see how it looks like.
Below are my coding for date split and opening of the right month and place the EquidID on the cells. how to go about tracking the day and fill the cells with color??
Dim StoredCmd() As String
Dim myValue1 As Variant
Dim myValue2 As Variant
Dim myValue3 As Variant
Dim temp5 As String
temp5 = txtSchedule.Value
StoredCmd = Split(temp5, "/")
myValue1 = (StoredCmd(0)) ' mm
myValue2 = (StoredCmd(1)) ' dd
myValue3 = (StoredCmd(2)) ' yyyy
With Workbooks("PM_Schedule.xls")
.Activate
If (myValue1 = 1) Then
Worksheets("Jan").Activate
ElseIf (myValue1 = 2) Then
Worksheets("Feb").Activate
ElseIf (myValue1 = 3) Then
Worksheets("Mar").Activate
ElseIf (myValue1 = 4) Then
Worksheets("Apr").Activate
ElseIf (myValue1 = 5) Then
Worksheets("May").Activate
ElseIf (myValue1 = 6) Then
Worksheets("Jun").Activate
ElseIf (myValue1 = 7) Then
Worksheets("July").Activate
ElseIf (myValue1 = 8) Then
Worksheets("Aug").Activate
ElseIf (myValue1 = 9) Then
Worksheets("Sept").Activate
ElseIf (myValue1 = 10) Then
Worksheets("Oct").Activate
ElseIf (myValue1 = 11) Then
Worksheets("Nov").Activate
ElseIf (myValue1 = 12) Then
Worksheets("Dec").Activate
Else
MsgBox ("not in the 12 month")
End If
find_empty_cell ("A5")
Selection.Cells.Offset(1, 0) = txtEquidID