ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Challenge (https://www.excelbanter.com/excel-programming/297467-challenge.html)

DB100[_2_]

Challenge
 
Hi all

I am seriously hoping someone can help.

I have created a Userform, which accesses a hidden sheet and dependin
on the selection runs a formula from the sheet and opens a relevan
spreadsheet...

But...........

I have now adapted this to open another set of files, but these ar
.doc and therefore won't open.

I have used the below to open Excel files and works fine. I am hopin
someone can help adapt it to a word document.

Thanks guys

David

Private Sub CmdOPEN_Click()
Worksheets("SHEET1").Range("a2").Value = cm1
megafile = Worksheets("SHEET1").Range("A1").Value
Windows("OPEN INFO.xls").Visible = False
Application.ScreenUpdating = True
Workbooks.Open megafile, False, True
Unload Me
End Su

--
Message posted from http://www.ExcelForum.com


William Ryan eMVP

Challenge
 
Hi David:

Are you wanting to drive word from Excel, just open word files or convert it
to Word?
To open word you can just use Shell, Shell ("winword.exe")

Depending on what you want to do, I'll answer more in depth.
"DB100 " wrote in message
...
Hi all

I am seriously hoping someone can help.

I have created a Userform, which accesses a hidden sheet and depending
on the selection runs a formula from the sheet and opens a relevant
spreadsheet...

But...........

I have now adapted this to open another set of files, but these are
doc and therefore won't open.

I have used the below to open Excel files and works fine. I am hoping
someone can help adapt it to a word document.

Thanks guys

David

Private Sub CmdOPEN_Click()
Worksheets("SHEET1").Range("a2").Value = cm1
megafile = Worksheets("SHEET1").Range("A1").Value
Windows("OPEN INFO.xls").Visible = False
Application.ScreenUpdating = True
Workbooks.Open megafile, False, True
Unload Me
End Sub


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 09:57 AM.

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