TODAVIA PROBLEMA

26/01/2009 - 05:35 por LUIS DANNY SALAS | Informe spam
Gracias, de acuerdo con la sugerencia elimine : Windows("Libro1").Activate
y utilice:
With Workbooks.Add
"procedimiento"
End with

funciona bien, pero el libro nuevo queda abierto y ademas aparecen otros que
tambien quedan abiertos, libro 6 libro 7,libro 8

??????????

te expongo el codigo completo:

Private Sub CONCENTRADO()
Application.ScreenUpdating = False
On Error GoTo Errores
Workbooks.Add
ThisWorkbook.Activate
Range("C6:F52").Select
Selection.Copy
With Workbooks.Add

Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
Range("C6").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=ESBLANCO($B6)=VERDADERO"
Selection.FormatConditions(1).Font.ColorIndex = 2
Range("C6").Select
Selection.Copy
Range("C7:C47").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("C6").Select
Selection.Copy
Range("A6:A47").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("B6").Select
End With
ThisWorkbook.Activate
Range("E5").Select
Selection.Copy
With Workbooks.Add
Range("C4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("C1:C3").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("D6:D57").Select
Selection.NumberFormat = "0"
Range("B6").Select
ActiveWindow.DisplayHeadings = False
Application.DisplayAlerts = False
Dim respuesta As Boolean

respuesta = Application.Dialogs(xlDialogSaveWorkbook).Show

If respuesta Then
MsgBox "Se ha guardado satisfactoriamente una copia de su concentrado"
Else
MsgBox "Operación cancelada por el usuario"
End If
With ActiveWindow
.Top = 10
.Left = -20
End With
ActiveWindow.Close
Application.DisplayAlerts = True
ThisWorkbook.Activate
Range("D11").Select
Exit Sub
Errores:
Application.CutCopyMode = False
Range("D11").Select
MsgBox "Ha ocurrido un error,debes cerrar Excel y volverlo a abrir para
poder digitalizar nuevamente tu concentrado"
Exit Sub
End With
End Sub

Preguntas similare

Leer las respuestas

Search Busqueda sugerida