ed
2013-06-12 04:17:22 UTC
Sub DropDown1_Change()
Dim temp As Date
Dim newday As Integer
Dim newmonth As Integer
Dim newyear As Integer
Dim temp2 As String
temp2 = DropDown1.Text
Range("F5").Select
temp = DateValue(ActiveCell)
If temp2 = "1 Week" Then
MsgBox DropDown4.Text
End If
newday = Day(temp) + 7
newmonth = Month(temp)
newyear = Year(temp)
ActiveCell.Value = DateSerial(newyear, newmonth, newday)
End Sub
The code isn't finished. Don't worry about the bottom. It fails every time at "temp2 = DropDown1.Text". Says "Run-Time Error 424: Object Required". What's the problem?
Also, how can I see the code that VBA automatically creates for the dropdown (if possible)? I thought that maybe if I could see it, it would lead me to the answer. Tried every button in the developer tab. Couldn't find it.
Thanks....