Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Open workbook without displaying

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    John G
    Posts
    62
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,940
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •