Miguel no desesperes, solo debes aprender a buscar un poco y ya...!
Abre un proyecto nuevo y en el Form1 coloca una caja de texto y renombrala por txtConfiguracion.text. Colocas un Boton con el nombre cmdPageSetup. Agrega tambien un Modulo Bas.
Codigo para el Form1
Private Sub cmdPageSetup_Click()
ShowPageSetup Me.hWnd, App.hInstance
End Sub
Codigo para el Modulo Bas. Module1
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type Rect
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Type PageSetupDlg
lStructSize As Long
hwndOwner As Long
hDevMode As Long
hDevNames As Long
flags As Long
ptPaperSize As POINTAPI
rtMinMargin As Rect
rtMargin As Rect
hInstance As Long
lCustData As Long
lpfnPageSetupHook As Long
lpfnPagePaintHook As Long
lpPageSetupTemplateName As String
hPageSetupTemplate As Long
End Type
Private Declare Function PageSetupDlg Lib "comdlg32.dll" Alias "PageSetupDlgA" (pPagesetupdlg As PageSetupDlg) As Long
Public Function ShowPageSetup(ByVal lngOwner As Long, ByVal lngAppInstance As Long)
On Error GoTo errHndl
Dim objPDlg As PageSetupDlg
Dim lDlgShow As Long
Dim sSet As String
sSet = ""
With objPDlg
.lStructSize = Len(objPDlg)
.hwndOwner = lngOwner
.hInstance = lngAppInstance
End With
lDlgShow = PageSetupDlg(objPDlg)
With objPDlg
sSet = sSet & "Settings from PageSetup : " & vbCrLf & vbCrLf
sSet = sSet & "Left Margin : " & (.rtMargin.Left / 1000) & " inches" & vbCrLf
sSet = sSet & "Right Margin : " & (.rtMargin.Right / 1000) & " inches" & vbCrLf
sSet = sSet & "Top Margin : " & (.rtMargin.Top / 1000) & " inches" & vbCrLf
sSet = sSet & "Bottom Margin : " & (.rtMargin.Bottom / 1000) & " inches" & vbCrLf
sSet = sSet & vbCrLf & vbCrLf
sSet = sSet & "Paper Size = " & (.ptPaperSize.x / 1000) & " x " & (.ptPaperSize.y / 1000) & " inches"
End With
Form1.txtConfiguracion.Text = sSet
Exit Function
errHndl:
MsgBox Err.Number & vbCrLf & vbCrLf & Err.Description
End Function
PD: El codigo no es de mi autoria, es un source que tengo desde hace un tiempo en mi empolvado directorio de Codigos Fuentes. Espero puedas darle el uso adecuado y aprendas un poco.