UserForm Help
:Hi,
I am writing this from an example from Debrah's web site: I am not sure how to test it to see if it works. When I try it says sub error? Private Sub UserForm_Initialize() txtMonth.Value = Date Function StartOfMonth(InputDate) If IsDate(InputDate) Then StartOfMonth = DateSerial(Year(InputDate), _ Month(InputDate), 1) Else StartOfMonth = Empty End If End Function -- Though daily learning, I LOVE EXCEL! Jennifer |
Hi Jennifer
Doesn't the error message say "Expected End Sub" ? A Sub must be closed with End Sub , and that is missing. Private Sub UserForm_Initialize() txtMonth.Value = Date End Sub Not guaranteeing that's the only error, it depends on what your objects are and what they are supposed to do. HTH. Best wishes Harald "Jennifer" skrev i melding ... :Hi, I am writing this from an example from Debrah's web site: I am not sure how to test it to see if it works. When I try it says sub error? Private Sub UserForm_Initialize() txtMonth.Value = Date Function StartOfMonth(InputDate) If IsDate(InputDate) Then StartOfMonth = DateSerial(Year(InputDate), _ Month(InputDate), 1) Else StartOfMonth = Empty End If End Function -- Though daily learning, I LOVE EXCEL! Jennifer |
All times are GMT +1. The time now is 12:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com