Create a floating worksheet in excel

Posted on 2014-08-12
Last Modified: 2014-08-19
I am trying to troubleshoot a spreadsheet that uses one worksheet as a user form and another worksheet as the report form.  The form worksheet is positioned at the top and basically consists of some command buttons to run the report worksheet for a specific day, print the report, and close the report.  The report worksheet sits directly below the form worksheet.  Both are sized to take up the entire width of the excel application window.

I have not been able to get the code to resize my windows to work correctly.  Here is the code that I am working with.  I have been getting an error when attempting to set the width.  The error states that it is unable to set the width property of the window class.

ActiveWindow.WindowState = xlNormal
ActiveWindow.Width = 768.75
ActiveWindow.Height = 122.75
ActiveWindow.Top = 1.75
ActiveWindow.Left = 1.75
ActiveWindow.DisplayWorkbookTabs = True

I will also attach the entire spreadsheet.  Thanks in advance.
Question by:AaronGreene1906
    LVL 31

    Accepted Solution

    Tried opening the file but can't see what you are trying to do. Have you looked at using an actual User Form?

    The form can be set to hover over the existing sheet but the sheet still has focus unless you click buttons on the User Form.

    The Form can be set to Show on workbook open and its position can be programmed.

    Rob H

    Author Comment

    I think that using an actual user form is going to be the most direct answer to this.  Thanks.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    I've recently been in need of an Excel macro that could add a letter before the text on multiple cells in an Excel document. My English is as it is, so I will try explain what it does diffrently. If you have an excel document with 2000 rows an…
    INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
    The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now