I have a dialogue (dialog?) with a date field, and I want to fill in today’s date before displaying it. So the macro which is displaying it has code like
D=Now() oDateControl=odialog.GetControl("datDate") REM This gives a runtime error "Object variable not set" oDateControl.Setdate(D) REM This has no effect on the value of the Date field in the control oDateControl.Date.Day=Day(D) oDateControl.Date.Month=Month(D) oDateCOntrol.Date.Year=Year(D)
But neither of these work for the reasons in the comments. Sorry for the formatting, but the “CODE” button doesn’t seem to work properly.