![]() |
#1
|
|||
|
|||
![]()
I want the button on userformTombol in document "Agendaku.docm" activate after The Excel application Quit.
What is the mistakes in the following code: ? (error message : Object dosn't support this property or method) Code:
Private Sub CommandButton1_Click()Dim ObjWord As Object Dim ObjDoc As Object Dim ObjForm As Object Set ObjWord = GetObject(, "Word.Application") Set ObjDoc = ObjWord.Documents("D:\Agendaku.docm") ObjWord.Visible = True Set ObjForm = ObjWord.ObjDoc.UserFormTombol ObjForm.CommandButton1.Enabled = True ObjForm.CommandButton3.Enabled = False ActiveWorkbook.Save Windows.Application.Quit End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word VBA: Open and work with a different doc from userform? | AlanC | Word VBA | 2 | 06-25-2018 06:58 AM |
Word UserForm search in Excel | jhancock1994 | Word VBA | 3 | 05-21-2017 11:51 PM |
Excel Userform to Word Template Bookmarks | JCrinage | Excel Programming | 1 | 11-02-2016 07:03 PM |
![]() |
ferguson4848 | Word VBA | 3 | 10-28-2016 09:05 PM |
Trying to populate Word bookmarks with excel UserForm | smd1112 | Excel Programming | 7 | 09-03-2014 09:42 PM |