N
new_to_vba
i need to open word from excel and then close word & open excel again. i have
a form that opens in excel without showing excel, only the form is visibe on
start up with command buttons to open different documents. i can open word
but it does not make it the active item. It sits at the bottom of the screen,
not visible for use. Second question; when i open another excel workbook and
then try to close and return to the original form the original form will not
display, can anyone help me?
code i am using below for first problem and also second problem.
Private Sub CommandButton1_Click()
Unload Me
Dim Word As New Word.Application
Dim WordDoc As New Word.Document
Set WordDoc = Word.Documents.Open("D:\NSS BULK\KUSTOM CONCRETE\Kustom
Working Documents\Safety\document register")
Word.Visible = True
End Sub
Private Sub CommandButton2_Click()
'saves and closes this workbook while opening the Switchboard workbook
Workbooks("Permit Register.XLS").Close SaveChanges:=True
Workbooks.Open ("D:\NSS BULK\KUSTOM CONCRETE\Kustom Working
Documents\SWITCHBOARD")
End Sub
a form that opens in excel without showing excel, only the form is visibe on
start up with command buttons to open different documents. i can open word
but it does not make it the active item. It sits at the bottom of the screen,
not visible for use. Second question; when i open another excel workbook and
then try to close and return to the original form the original form will not
display, can anyone help me?
code i am using below for first problem and also second problem.
Private Sub CommandButton1_Click()
Unload Me
Dim Word As New Word.Application
Dim WordDoc As New Word.Document
Set WordDoc = Word.Documents.Open("D:\NSS BULK\KUSTOM CONCRETE\Kustom
Working Documents\Safety\document register")
Word.Visible = True
End Sub
Private Sub CommandButton2_Click()
'saves and closes this workbook while opening the Switchboard workbook
Workbooks("Permit Register.XLS").Close SaveChanges:=True
Workbooks.Open ("D:\NSS BULK\KUSTOM CONCRETE\Kustom Working
Documents\SWITCHBOARD")
End Sub