Error 9 en Tiempo de Ejecución

25/07/2005 - 23:50 por AnGeLo | Informe spam
Holas Grupo, estoy tratando de ejecutar la siguiente macro y me sale Error 9
en Tiempo de Ejecución.

Sub Macro3()
Application.ScreenUpdating = False
Sheets("E.Cta.").Select
Sheets("E.Cta.").Copy
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Range("A1").Select
ActiveSheet.Shapes("Button 1").Select
Selection.Delete
ActiveSheet.Shapes("Button 3").Select
Selection.Delete
Application.ScreenUpdating = True
End Sub

Saludos,
 

Leer las respuestas

#1 KL
26/07/2005 - 00:10 | Informe spam
Hola Angelo,

Prueba esto:

Sub Test()
With Application
.ScreenUpdating = False
Sheets("E.Cta.").Copy
With ActiveSheet
.Cells.Copy
.Cells.PasteSpecial Paste:=xlValues
.Shapes("Button 1").Delete
.Shapes("Button 3").Delete
.Range("A1").Select
End With
.CutCopyMode = False
.ScreenUpdating = True
End With
End Sub

o un pelin mas compacto:

Sub Macro3()
With Application
.ScreenUpdating = False
Sheets("E.Cta.").Copy
With ActiveSheet
.Cells.Copy: .Cells.PasteSpecial Paste:=xlValues
.Shapes("Button 1").Delete: .Shapes("Button 3").Delete
.Range("A1").Select
End With
.CutCopyMode = False: .ScreenUpdating = True
End With
End Sub


Saludos,
KL


"AnGeLo" wrote in message
news:
Holas Grupo, estoy tratando de ejecutar la siguiente macro y me sale Error
9 en Tiempo de Ejecución.

Sub Macro3()
Application.ScreenUpdating = False
Sheets("E.Cta.").Select
Sheets("E.Cta.").Copy
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Range("A1").Select
ActiveSheet.Shapes("Button 1").Select
Selection.Delete
ActiveSheet.Shapes("Button 3").Select
Selection.Delete
Application.ScreenUpdating = True
End Sub

Saludos,

Preguntas similares