Results 1 to 4 of 4

object require error

Threaded View

  1. #1
    Registered User
    Join Date
    07-08-2012
    Location
    Venezuela
    MS-Off Ver
    Excel 2010
    Posts
    62

    object require error

    The following macro does the job of printing. But when returning from printing or when the printout was cancelled, an error message box comes out with "Object Require" on it. I need to do reset some cells format which obviosly I can not.

    Public Sub IMPRIMIR()
    fila = ActiveCell.Row
    col = ActiveCell.Column
    Dim Resp As String
    Range("b1:I67").Select
    With Selection.Interior
            .Pattern = xlNone
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
        
        With Selection.Font
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
        End With
    Resp = MsgBox("Desea Imprimir ?", vbYesNoCancel, "IMPRIMIR")
    If Resp = "6" Then
    ActiveSheet.PrintPreview
    End If
    With Selection.Interior
    .Pattern = xlSolid
    .PatternColorIndex = xlAutomatic
    .ThemeColor = xlThemeColorAccent3
    .TintAndShade = 0.599993896298105
    .PatternTintAndShade = 0
    End With
    Range("c4:h5,c7:h9,B12:i21,b27:i66").Select
    With Selection.Interior
    .Pattern = xlSolid
    .PatternColorIndex = xlAutomatic
    .ThemeColor = xlThemeColorAccent3
    .TintAndShade = 0.799981688894431
    .PatternTintAndShade = 0
    End With
    Range("b2:i2,b11:i11,b24:i26,b67:i67").Select
    With Selection.Interior
    .Pattern = xlSolid
    .PatternColorIndex = xlAutomatic
    .ThemeColor = xlThemeColorAccent3
    .TintAndShade = -0.499984740745262
    .PatternTintAndShade = 0
    End With
    With Selection.Font
            .ThemeColor = xlThemeColorDark2
            .TintAndShade = 0
    End With
    Active.cell(fila, col).Select
    End Sub
    Help will be appreciated.

    Thanks

    Necalabria
    Last edited by necalabria; 08-26-2012 at 08:35 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1