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
Sizlere daha iyi bir deneyim sunabilmek icin sitemizde çerez konumlandırmaktayız, web sitemizi kullanmaya devam ettiğinizde çerezler ile toplanan kişisel verileriniz Veri Politikamız / Bilgilendirmelerimizde belirtilen amaçlar ve yöntemlerle mevzuatına uygun olarak kullanılacaktır.