Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel makro

Status
Not open for further replies.

andreas57

Technical User
Sep 29, 2000
110
CH
i would like to make a makro which goes through a hole document but by the following code i allways get the eror: types uncompatible

what can i do?

Sub Makro2()
'
' Makro2 Makro
' Makro am 14.11.00 von Computer aufgezeichnet
'

For a = 17 To 5000 Step 8
Rows("(a+1):(a+1)").Select
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Range("O(a)").Select
Selection.Cut Destination:=Range("N(a+1)")
Range("P(a)").Select
Selection.Cut Destination:=Range("N(a+2)")
Range("Q(a)").Select
Selection.Cut Destination:=Range("N(a+3)")
Range("R(a)").Select
Selection.Cut Destination:=Range("N(a+4)")
Range("S(a)").Select
Selection.Cut Destination:=Range("N(a+5)")
Range("T(a)").Select
Selection.Cut Destination:=Range("N(a+6)")
Range("V(a)").Select
Selection.Cut Destination:=Range("U(a+1)")
Range("W(a)").Select
Selection.Cut Destination:=Range("U(a+2)")
Range("X(a)").Select
Selection.Cut Destination:=Range("U(a+3)")
Range("Y(a)").Select
Selection.Cut Destination:=Range("U(a+4)")
Range("Z(a)").Select
Selection.Cut Destination:=Range("U(a+5)")
Range("AA(a)").Select
Selection.Cut Destination:=Range("U(a+6)")
Range("AC(a)").Select
Selection.Cut Destination:=Range("AB(a+1)")
Range("AD(a)").Select
Selection.Cut Destination:=Range("AB(a+2)")
Range("AE(a)").Select
Selection.Cut Destination:=Range("AB(a+3)")
Range("AF(a)").Select
Selection.Cut Destination:=Range("AB(a+4)")
Range("AG(a)").Select
Selection.Cut Destination:=Range("AB(a+5)")
Range("AH(a)").Select
Selection.Cut Destination:=Range("AB(a+6)")
Rows("(a+1):(a+1)").Select
Selection.Insert Shift:=xlDown
Next a
End Sub


andreas owen
aowen@swissonline.ch
 
just so you know i am helping this guy out by email.
Karl Pietri
lordhuh.pota.to

 
i've solved the problem thanks anyway

andreas owen
aowen@swissonline.ch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top