ok jetzt hab ich den fehler auch, obwohl ich jetzt first2 als integer deklariert hab...
komisch, weißt du was da los is?
Kannst ihn auch verbessern wennst willst...=(
code:
Sub Forward()
Dim first1 As String
Dim first2 As Integer
Dim all1 As String
Dim all2 As String
first1 = "F"
first2 = Range("AI" + "7395").Value
first2 = CInt(first2)
'
first2 = first2 + 4
'
first2 = CStr(first2)
all1 = first1 + first2
first2 = CInt(first2)
first2 = first2 + 6
first2 = CStr(first2)
all2 = first1 + first2
Range("all1:all2").Select
first2 = Range("AI" + "7395").Value
first2 = CInt(first2)
first2 = first2 + 5
first2 = CStr(first2)
all1 = first1 + first2
first2 = CInt(first2)
first2 = first2 + 6
first2 = CStr(first2)
all2 = first1 + first2
Selection.Cut Destination:=Range("all1:all2")
ActiveSheet.Shapes("Button 36").Select
Selection.ShapeRange.IncrementTop 12.6
Range("I7404").Select
ActiveSheet.Shapes("Button 37").Select
Selection.ShapeRange.IncrementTop 12.6
Range("J7405").Select
ActiveSheet.Shapes("Button 38").Select
Selection.ShapeRange.IncrementTop 12.6
Range("J7406").Select
all1 = Range("AI" + "7395").Value
all1 = CInt(all1)
all1 = all1 + 1
all1 = CStr(all1)
Range("AI" + "7395").Value = all1
End Sub
LG,
Morlon
|