dso_direct_link
Nieuwe gebruiker
- Lid geworden
- 27 okt 2003
- Berichten
- 1
Bij deze macro geeft mijn excell2002 steeds de foutmelding: compile error; can't find project or library. Deze macro werkte perfect op excell97 nu dus niet meer kan iemand mij hier bij helpen?
Sub ML_Optel_2()
' Macro : ML_Optel_2
' Auteur : Kris
' Functie : Voegt 2 kolommen samen
' Datum : 19-07-1999
' Versie : 2.0
Dim nr As Long
On Error GoTo Err
a$ = ActiveWindow.Caption
GoTo AllesOk
Err:
Msg% = MsgBox("U moet eerst een workbook openen !", vbCritical, "Optel_2 2.0 - Error")
GoTo Einde
AllesOk:
r% = ActiveCell.Row
c% = ActiveCell.Column
ActiveCell.SpecialCells(xlLastCell).Select
nr = ActiveCell.Row
If r% = 1 Then
vr% = 1
Else
vr% = 2
End If
Cells(vr%, c% + 1).Select
Selection.EntireColumn.Insert
ActiveCell.FormulaR1C1 = "=trim(rc[-2]&"" ""&rc[-1])"
Selection.Copy
Range(Cells(vr%, ActiveCell.Column), Cells(nr, ActiveCell.Column)).Select
ActiveSheet.Paste
Range(Cells(vr%, ActiveCell.Column), Cells(nr, ActiveCell.Column)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Einde:
End Sub
Het bold gedrukte werdt gehighlight bij de foutmelding
Sub ML_Optel_2()
' Macro : ML_Optel_2
' Auteur : Kris
' Functie : Voegt 2 kolommen samen
' Datum : 19-07-1999
' Versie : 2.0
Dim nr As Long
On Error GoTo Err
a$ = ActiveWindow.Caption
GoTo AllesOk
Err:
Msg% = MsgBox("U moet eerst een workbook openen !", vbCritical, "Optel_2 2.0 - Error")
GoTo Einde
AllesOk:
r% = ActiveCell.Row
c% = ActiveCell.Column
ActiveCell.SpecialCells(xlLastCell).Select
nr = ActiveCell.Row
If r% = 1 Then
vr% = 1
Else
vr% = 2
End If
Cells(vr%, c% + 1).Select
Selection.EntireColumn.Insert
ActiveCell.FormulaR1C1 = "=trim(rc[-2]&"" ""&rc[-1])"
Selection.Copy
Range(Cells(vr%, ActiveCell.Column), Cells(nr, ActiveCell.Column)).Select
ActiveSheet.Paste
Range(Cells(vr%, ActiveCell.Column), Cells(nr, ActiveCell.Column)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Einde:
End Sub
Het bold gedrukte werdt gehighlight bij de foutmelding