• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Minimixed Window

manoj_th

Member
Hello Sir,

I need a file to be opened in a minimized window.
Is that require VBA? If yes, Can any one please provide the code.
Thanks in advance.

Manoj
 
In the workbook, that you would like to open in minimized state write the following code in open event of the workbook:
Code:
Private Sub Workbook_Open()
    ActiveWindow.WindowState = xlMinimized
End Sub
 
In the workbook, that you would like to open in minimized state write the following code in open event of the workbook:
Code:
Private Sub Workbook_Open()
    ActiveWindow.WindowState = xlMinimized
End Sub
thanks,
but I need the file to open as the size of calculator
 
Try this..it will resize the window

Code:
Private Sub Workbook_Open()
    With ActiveWindow
        .WindowState = xlNormal
        .Height = 400
        .Width = 500
        .Left = .Height / 2
        .Top = .Width / 2
    End With
End Sub
 
If you would like the opened workbook to open in the center of the screen, then modify your code as given below:
Code:
Private Sub Workbook_Open()
    With ActiveWindow
        .WindowState = xlNormal
        .Height = 400
        .Width = 500
        .Left = (Application.UsableWidth * 0.25) + 1
    End With
End Sub
 
Back
Top