matapagi2019
New Member
- Joined
- Mar 8, 2019
- Messages
- 8
How can I close excel application with commandButton2 in ms word after I open it with CommandButton1 with vba code :
[Vba}
Private Sub CommandButton1_Click()
Dim ObjExcel
Dim ObjXls
Set ObjExcel = CreateObject("Excel.Application")
Set ObjXls = ObjExcel.Workbooks.Open("D:\Agendaku.xls")
ObjExcel.Visible = True
End Sub
Thanks.
[Vba}
Private Sub CommandButton1_Click()
Dim ObjExcel
Dim ObjXls
Set ObjExcel = CreateObject("Excel.Application")
Set ObjXls = ObjExcel.Workbooks.Open("D:\Agendaku.xls")
ObjExcel.Visible = True
End Sub
Thanks.