I have an Excel sheet (Sheet3) that contains 3 buttons, "Print", "Clear" and "Start", the program yesterday was working correctly until an error appears when I try to open a Form that is available and that exists, someone can help?
Rich (BB code):
Private Sub cmd_Clear_Click()
Range("A14:A125").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.ClearContents
Selection.Interior.ColorIndex = xlNone
Selection.Font.bold = False
Selection.Font.Italic = False
Selection.Font.Underline = xlUnderlineStyleNone
Range("B6:D10").Select
Selection.ClearContents
Range("B6:D6").Select
End Sub
Private Sub cmd_Print_Click()
Application.ScreenUpdating = False
Range("A5:J58").Select
ActiveSheet.PageSetup.PrintArea = "$A$5:$J$58"
Range("D15").Select
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = "$A$5:$J$58"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
.PrintErrors = xlPrintErrorsDisplayed
End With
Range("A1").Select
Application.ScreenUpdating = True
Application.Dialogs(xlDialogPrint).Show
End Sub
Private Sub cmd_Start_Click()
Error there!!!!!!
------------------
Dates.Show
----------------
End Sub
Last edited by a moderator: