Rapor kenar boşlukları

Katılım
25 Aralık 2005
Mesajlar
4,160
Excel Vers. ve Dili
MS Office 2010 Pro Türkçe
Sayın ssmr,

Aşağıdaki kodu deneyin. Ben deneme için zaman bulamadım.

Kod:
Private Type PrtMipString
    strRGB As String * 28
End Type
Private Type PtrMipType
    xLeftMargin As Long
    yTopMargin As Long
    xRightMargin As Long
    yBotMargin As Long
    fDataOnly As Long
    xWidth As Long
    yHeight As Long
    fDefaultSize As Long
    cxColumns As Long
    yColumnSpacing As Long
    xRowSpacing As Long
    rItemLayout As Long
    fFastPrint As Long
    fDatasheet As Long
End Type


Public Function GetRptMargin(StrRptName As String, strMargin As String) As Long
'function returns the specified margin size in twips

Dim pmString As PrtMipString
Dim pm As PtrMipType
Dim rpt As Report

    On Error GoTo RMError
    
    Set rpt = Reports(StrRptName)
    pmString.strRGB = rpt.PrtMip
    LSet pm = pmString
    
    Select Case Left(strMargin, 1)
        Case "L"
            GetRptMargin = pm.xLeftMargin
        Case "R"
            GetRptMargin = pm.xRightMargin
        Case "T"
            GetRptMargin = pm.yTopMargin
        Case "B"
            GetRptMargin = pm.yBotMargin
        Case Else
            MsgBox "Internal logic error in GetRptMargin: invalid argument", vbExclamation, RMTitle
    End Select
        
RMExit:
    Set rpt = Nothing
    Exit Function
    
RMError:
    MsgBox "Error in GetRptMargin: " & Err.Number & " - " & Err.Description, vbExclamation
    Resume RMExit

End Function
İyi çalışmalar:)
 
Katılım
6 Ekim 2006
Mesajlar
371
Excel Vers. ve Dili
2010
teşekkürler sayın modalı deneyip sonucu bildiririm
 
Üst