MrExcel Publishing
Your One Stop for Excel Tips & Solutions

G-Man Screen Resolution

Posted by Damien on July 24, 2001 7:00 PM

Very nice little macro should do what i'm after didn't know that you could return the value of screen resoultion from user 32 file I suppose that you can if you can change it but having problem getting it to run what do you mean by the Workbook_Open module is that the Auto_Open module or are you referring to the Thisworkbook excel object or was it a class module ?
Anyway I get a error from

Declare Function GetSystemMetrics Lib "user32"_(ByVal nIndex As Long) As Long

error: Public members of object modules

any ideas returning setting from the user file is just getting a little advanced for me understand exactly what it is doing a stuff but have done little of it my self the zoom idea is good but depending on the system settings

Posted by Ivan F Moala on July 25, 2001 2:08 AM

The error is due to the fact that you have declared
a Public Function in a Private default
any Function you write as Function ... is assumed
to be Public.......You have probably placed this
Function in a worksheet module OR the Thisworkbook
module either remove it or decalre it as a private