Open then minimize workbook

mnmhenry

Board Regular
Joined
Mar 28, 2002
Messages
169
I have tried searching for this code but just cant find (or remember) how i did it before.

I have a regular workbook (which changes name upon start up). In this workbook is a button that opens a linked database of products.

I want this button

1. to open the database C:/Database/db.xls
2. Minimize it
3. Maximize my regular workbook to its original state (this is where I am having the problem because the workbook name constantly changes)

Thanks for helping
Mark
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Maybe like this:
Code:
Application.ScreenUpdating = False
    FilePath = "C:/Database/db.xls"
    Workbooks.Open FilePath
    ActiveWindow.Visible = False
Application.ScreenUpdating = True
 
Upvote 0
The benefit of the one above is that the sheet is completely hidden. If that's not what you want, just want it minimized, this will do that:
Code:
Application.ScreenUpdating = False
    Workbooks.Open "C:/Database/db.xls"
    ActiveWindow.WindowState = xlMinimized
Application.ScreenUpdating = True
 
Upvote 0
ADVERTISEMENT
Hi,

I had a similar requirement as in this thread. I tried the code (ActiveWindow.Visible = False)

And now my workbook doesn't show at all, even if I disable macros. Please tell me how to make my workbook visible :(


Regards,
 
Upvote 0
Hi,

Can anyone tell me how to make my workbook visible again.

I tried

ActiveWindow.Visible = true

But my workbook still doesn't show up :(
 
Upvote 0
ADVERTISEMENT
It's not active anymore, so you'll have to call the workbook by name instead of "ActiveWorkbook".
 
Upvote 0

Forum statistics

Threads
1,196,357
Messages
6,014,772
Members
441,847
Latest member
Linki

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