lior03
12-12-2007, 02:34 AM
helllo
i wanted to create my own print command for excel .i created a user form
which will include all my necessary information before print.
first a RefEdit1 for specifing the print area.then 3 checkboxes , one for printing comments ia the prtint area the second for print title row and a third for printing grid lines.i wanted 2 command buttons . one for a preview and the other for printing my work .
i came up with this:
Private Sub CheckBox1_Click()
ActiveSheet.PageSetup.PrintComments = xlPrintInPlace
End Sub
Private Sub CheckBox2_Click()
End Sub
Private Sub CommandButton1_Click()
UserForm17.Hide
End Sub
Private Sub CommandButton2_Click()
ActiveSheet.PrintPreview
End Sub
Private Sub RefEdit1_BeforeDragOver(cancel As Boolean, ByVal Data As _
MSForms.DataObject, ByVal x As stdole.OLE_XPOS_CONTAINER, _
ByVal y As stdole.OLE_YPOS_CONTAINER, ByVal _
DragState As MSForms.fmDragState, Effect As _
MSForms.fmDropEffect, ByVal Shift As Integer)
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
Dim ch As CheckBox
For Each ch In UserForm17
ch.Value = ""
Next
End Sub
can anyone help?
thanks
i wanted to create my own print command for excel .i created a user form
which will include all my necessary information before print.
first a RefEdit1 for specifing the print area.then 3 checkboxes , one for printing comments ia the prtint area the second for print title row and a third for printing grid lines.i wanted 2 command buttons . one for a preview and the other for printing my work .
i came up with this:
Private Sub CheckBox1_Click()
ActiveSheet.PageSetup.PrintComments = xlPrintInPlace
End Sub
Private Sub CheckBox2_Click()
End Sub
Private Sub CommandButton1_Click()
UserForm17.Hide
End Sub
Private Sub CommandButton2_Click()
ActiveSheet.PrintPreview
End Sub
Private Sub RefEdit1_BeforeDragOver(cancel As Boolean, ByVal Data As _
MSForms.DataObject, ByVal x As stdole.OLE_XPOS_CONTAINER, _
ByVal y As stdole.OLE_YPOS_CONTAINER, ByVal _
DragState As MSForms.fmDragState, Effect As _
MSForms.fmDropEffect, ByVal Shift As Integer)
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
Dim ch As CheckBox
For Each ch In UserForm17
ch.Value = ""
Next
End Sub
can anyone help?
thanks