![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: John G
Posts: 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?
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|