Hi everyone,
I have the following code to check Screen Resolution at workbook startup and change it directly to 1024 X 768 if it is not.
In addition to that, at workbook startup, I want to save the original Screen Resolution in the memory in order to reset Screen Resolution to it original setting before closing the program.
For that purpose I made some changes to the code (My changes work perfectly at workbook startup), but before closing the program, I receive a Compile error message says that (ByRef argument type mismatch),
Here is main code:
Option Explicit
![]()
Please Login or Register to view this content.
And here is Workbook Open and Before Closing codes:![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
An other problem is that when the original Screen Resolution is 800 X 600, and after it is changed by the previous code to 1024 X 768, the workbook window is minimized and it is maximized automaticcly even after using the following line with Workbook_Open code:![]()
Please Login or Register to view this content.
Application.WindowState = xlMaximized
Can you please find me a solution for that and tell my what is wrong with my code?
Thanks a lot,
Bookmarks