ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   open external workbook keep hidden (https://www.excelbanter.com/excel-programming/358477-open-external-workbook-keep-hidden.html)

cereldine[_8_]

open external workbook keep hidden
 

A function i'm producing opens a external workbook to retrieve some
values from there, i would like to keep this workbook either invisible
or minimized when it opens. Is this possible, ive done a similar thing
in access.
ive tried the following approaches but with little joy, any other
ideas

Workbooks.Open (FilePath2).application.visible = false
ActiveWindow.Visible = False
Workbooks.Application.Visible = False

some of these produce errors the other close both workbooks.
thanks


--
cereldine
------------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...o&userid=32069
View this thread: http://www.excelforum.com/showthread...hreadid=531485


Bob Phillips[_6_]

open external workbook keep hidden
 
This works for me

Dim FilePath As String

Application.ScreenUpdating = False
FilePath = "K:\My Documents\Finance\Misc\Rear bedroom extension.xls"
Workbooks.Open FilePath
ActiveWindow.Visible = False
Application.ScreenUpdating = True


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"cereldine" wrote
in message ...

A function i'm producing opens a external workbook to retrieve some
values from there, i would like to keep this workbook either invisible
or minimized when it opens. Is this possible, ive done a similar thing
in access.
ive tried the following approaches but with little joy, any other
ideas

Workbooks.Open (FilePath2).application.visible = false
ActiveWindow.Visible = False
Workbooks.Application.Visible = False

some of these produce errors the other close both workbooks.
thanks


--
cereldine
------------------------------------------------------------------------
cereldine's Profile:

http://www.excelforum.com/member.php...o&userid=32069
View this thread: http://www.excelforum.com/showthread...hreadid=531485





All times are GMT +1. The time now is 07:08 PM.

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