Try setting the OLE verb property to ctl.Verb = acOLEVerbShow
Private Sub Report_Open(Cancel As Integer) Dim ctl As Control, wks As Excel.Worksheet Set ctl = Me.OLEUnbound128 ctl.Verb = acOLEVerbShow ctl.Action = acOLEActivate Set wks = ctl.Object.Application.Workbooks(1).Worksheets(1) ' wks.Cells(22, 4).Value = "" Set wks = Nothing ctl.Save ctl.Close Set ctl = Nothing End Sub Private Sub Form_Open(Cancel As Integer) Dim ctl As Control, wks As Excel.Worksheet Set ctl = Me.OLEUnbound85 ctl.Verb = acOLEVerbShow ctl.Action = acOLEActivate Set wks = ctl.Object.Application.Workbooks(1).Worksheets(1) wks.Cells(22, 4).Value = "" Set wks = Nothing ctl.Save ctl.Close Set ctl = Nothing End Sub




Reply With Quote