Dim arcmap As New Class_Arcmap Private Const PREVIEW_FILENAME = "c:\temp\exportMap.jpg" '============================================================================ ' CloseButton_Click '============================================================================ Private Sub CloseButton_Click() Me.Hide End Sub '============================================================================ ' Landscape_Click '============================================================================ Private Sub landscape_Click() Dim h, w arcmap.setLandscape Me.ImageLandscape.Visible = True Me.ImagePortrait.Visible = False h = Me.ImageLandscape.height / 72 ' 72 Points per Inch FORM resolution w = Me.ImageLandscape.width / 72 h = Round(h * 96) - 2 ' 96 pixels per inch SCREEN resolution w = Round(w * 96) - 2 arcmap.ExportToJeg h, w, PREVIEW_FILENAME Me.ImageLandscape.Picture = LoadPicture(PREVIEW_FILENAME) End Sub '============================================================================ ' Portrait_Click '============================================================================ Private Sub Portrait_Click() Dim h, w arcmap.setPortrait Me.ImageLandscape.Visible = False Me.ImagePortrait.Visible = True h = Me.ImagePortrait.height / 72 ' 72 Points per inch FORM resolution w = Me.ImagePortrait.width / 72 h = Round(h * 96) - 2 ' 96 pixels per inch SCREEN resolution w = Round(w * 96) - 2 arcmap.ExportToJeg h, w, PREVIEW_FILENAME Me.ImagePortrait.Picture = LoadPicture(PREVIEW_FILENAME) End Sub '============================================================================ ' PrintButton_Click '============================================================================ Private Sub PrintButton_Click() arcmap.PrintActiveView End Sub '============================================================================ ' UserForm_Initilize '============================================================================ Private Sub UserForm_Initialize() landscape_Click End Sub