Full Version: Default workbook view
UtterAccess Forums > Microsoft® Office > Microsoft Excel
I am not sure if I can explain this but I will do my best. When I created a new Excel Database, my screen encompasses the entire tables, command button etc., but when I open the same workbook from different computer, I cannot see the whole screen that I would see in my computer. My main objective is that the users may be able to view the entire table/Excel screen that I would but I don't know how to do it.
I have tried changing the zoom to 75% but it looks weird, the letters look smaller and blurry and hard to read. I also tried protecting the windows from tools but didn't work.
Can someone please advice? Thanks.
Hmmm... harder to be done then said...
ost probably the other machine works with different resolution.
You should either
1) make the application look right at the machine with the minimum resolution (800x600 maybe?)
2) you can make use of API calls, determine the resolution and adjust the zoom (at the risk that your application will be hardly legible on smaller displays)
I would probably opt for 1).
Thanks for the advice. Well, I met some of our clients today and found few problems. In one PC, the screen would not display even the quarter of my WB Menu Page, in one PC I received a compile error in : This Workbook message as soon as I opened my workbook. Well, the workbook was saved using userinterface = true, like the way you had told me before (thanks), I think that happened because the PC was very old, of course the new PCs didn't have any problem. I don't think it'll be possible to change resolution in each PC of the clients. I am wondering about the options that I have. I am also wondering to have the clients install Office 2003 (coz I have 2003) with the Add-ins.
So can you please tell me the story about the API use to achieve this or direct me to where I can get this information? I would really appreciate it. Thanks sad.gif
Hi again umesh,
Thanks for the question, APIs is interesting stuff sad.gif
At the top of the module declare the API calls:
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Private Const SM_CYSCREEN As Long = 1
Private Const SM_CXSCREEN As Long = 0

and test like this:
Sub test()
Dim ScreenHeight As Long
Dim ScreenWidth As Long
Let ScreenHeight = GetSystemMetrics(SM_CYSCREEN)
Let ScreenWidth = GetSystemMetrics(SM_CXSCREEN)
MsgBox "Current screen resolution is " & ScreenWidth & " x " & ScreenHeight & " pixels."
End Sub

Of course, it's fully up to you how do you react to the system metrics found. E.g. you can prevent the workbook from opening on a low-res system, you can display a wrning, you can recomend to decrease zoom, etc...
Thank you Martin, I will look unto this and get back to you. sad.gif
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.