Open workbook without displaying

jgoulart

Board Regular
Joined
Feb 16, 2002
Messages
62
I have a workbook that I am using as a database that I am calling from my master workbook and I want to be able to get data from it without making it visible. when I write to it I have to activate it (at least I think I do). Is there a way to write to it so it is not visible to the user. Right now I open it activate my master wb and then write to it with screenupdating false and save and close it but it still flashes my screen. Am I doing something wrong or is there a better way of doing this?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Just hide the workbook when it's open i.e. Window, Hide. The workbook will then be invisible but you'll still be able to read and write data to it. When you try to open it from your master workbook it'll not be visible e.g.

Sub OpenDatabaseWorkbook()
Dim wbDatabase As Workbook
Dim shtData As Worksheet

Set wbDatabase = Workbooks.Open("C:tempbook1.xls")
Set shtData = wbDatabase.Sheets("Data")

'You can now read and write to wbDatabase or shtData

End Sub

Hope this helps,
D
 
Upvote 0

Forum statistics

Threads
1,214,400
Messages
6,119,288
Members
448,885
Latest member
LokiSonic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top