Question : ScaleMode in VBA

    Dim rptMe As Report
    Set rptMe = Me
    rptMe.ScaleMode = 3

gives the error:

You entered an expression that has an invalid reference to the property ScaleMode. The property may not exist or may not apply to the object you specified.

Question:
so how can i set the default measurement to Pixels?
(i want to convert inches to Pixels by multiplying by 1440, but i don't know if every user's computer will be set to Pixels.  what if it is set to Twips?)

OR,
if i can't SET it to Pixels, how can i tell (API call maybe) what it IS set to?

thanks,
mac

Answer : ScaleMode in VBA

Hi mac,

Stick your code in the detail SECTION format or print event it will work, nothing wrong with your syntax.
It will not work in the report open event, tried it got an error same as you.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Alan :)
Random Solutions  
 
programming4us programming4us