Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I get the following error when trying to add the code below to a custom button. I don't seem to get this error if i add to a drawing object though. Can anyone help? Am i doing something wrong? Error i receive is "Run Time Error 1004 Application Defined or Object Defined Error." Private Sub CommandButton1_Click() Count = Worksheets.Count For i = 2 To Count Sheets(i).Select Range("a2").Select Range("a1:z2000").Select 'Range("a1,a5000").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Rows("1300:2500").Select Selection.Delete Shift:=xlUp Columns("Q:BG").Select Selection.Delete Shift:=xlToLeft Range("A1").Select Next i Application.DisplayAlerts = False On Error Resume Next Sheets("trialbal").Delete Sheets("Input").Delete Sheets(1).Select Application.DisplayAlerts = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run-time error '50290': Application-defined or object-defined erro | Excel Discussion (Misc queries) | |||
I got this problem run-time error 1004 application defined ... | Excel Discussion (Misc queries) | |||
Macro error : Application-defined or object-defined error | Excel Discussion (Misc queries) | |||
1004 App - defined or object-defined error | Excel Programming | |||
Runtime Error 1004 -- Application Defined or Object Defined Error | Excel Programming |