I want to make a GUI-like interface for an Excel workbook, and I don't want the workbook to be visible until it closes. However, making the workbook not visible messes with the references of my code and I cannot read the ranges without heavily modifying it. I tried minimizing the window, but that minimizes the form as well.
Is there a way to keep the active workbook active but not readily visible, and the form visible?
.Selector.Activatein your code. This is a bad practice and is highly recommended to be avoided (many undefined issues and slow code). If this is the case google for how to avoid using them both, there are many tutorials. Yes, removing them can be a lot of work, but saves you much time in future debugging and makes your code a lot better.Private Sub Workbook_Open(): Application.Visible = False: UserForm1.Show: End Sub.Selectand.Activateinstead reference the worksheet directly likeWorksheets("MySheetName").Range("A1"). But I think because he said hiding the sheet messes up his references he is using.Selectand he has to change that to not using.Selectand reference directly. Then the references would still work even after hiding the workbook.