ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Command button (https://www.excelbanter.com/excel-programming/320887-command-button.html)

jungleman

Command button
 
If I put a COMMAND BUTTON in excel or any other buton, how do I view a
specific word document? Do I insert the document in excel or can I have a
seperate folder in MY DOCUMENTS with all of the WORD files I want to insert?

Dave Peterson[_5_]

Command button
 
You have a few options.

You could use Insert|Object and put the word document in the worksheet.

Or you could even use a different object and assign a hyperlink to that word
document.

You could even use that button and have code that opens the word document.

Option Explicit
Private Sub CommandButton1_Click()
Shell "start ""c:\my documents\word\test1.doc"""
End Sub



jungleman wrote:

If I put a COMMAND BUTTON in excel or any other buton, how do I view a
specific word document? Do I insert the document in excel or can I have a
seperate folder in MY DOCUMENTS with all of the WORD files I want to insert?


--

Dave Peterson


All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com