Results 1 to 7 of 7

Thread: Solved: edit Excel ole

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Tutor
    Joined
    Dec 2006
    Posts
    220
    Location
    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
    Last edited by Aussiebear; 04-08-2023 at 02:13 PM. Reason: Adjusted the code tags
    "Intellectual passion occurs at the intersection of fact and implication."

    SGB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •