Hello.
Uing excel 2003, suddently my macro won't execute. The problem started when I put in a new line (a pastespecial commnd) into the code. I dont get a error message, the debugger doesn't kick in. Just nothing. I removed my new line, saved, opened again (promted for activate macro and accepted), still nothing. I shut down excel, restarted computer. Nothing. Ive trippledchecked my security settings, everything looks fine as far as I can see. By the way, no macro in that woorbokk runs. Makros in other workbooks run...
BTW, here's the code. Worked just fine a hour ago.
Would love to put in a pastespecial with all the conditional formats... but thats of secondary importance right now!
Anyone?
Uing excel 2003, suddently my macro won't execute. The problem started when I put in a new line (a pastespecial commnd) into the code. I dont get a error message, the debugger doesn't kick in. Just nothing. I removed my new line, saved, opened again (promted for activate macro and accepted), still nothing. I shut down excel, restarted computer. Nothing. Ive trippledchecked my security settings, everything looks fine as far as I can see. By the way, no macro in that woorbokk runs. Makros in other workbooks run...
BTW, here's the code. Worked just fine a hour ago.
Code:
Sub Slette1()
' Slette1 Makro
' Makro registrert 04.08.2014 av jhetland
'
Dim Teamarbeid As Workbook, Pasientliste As Workbook
If Sheets("Behandlingsavdelingen").Range("Q7").Value = "B" Then
Workbooks.Open ("F:\Utkast\Teamarbeid (Jenskladd)\Teamarbeid.xls")
Set Teamarbeid = Workbooks("Teamarbeid.xls")
' Set TeamA = Workbooks ("TeamarbeidA.xls")
' Set TeamB = Workbooks ("TeamarbeidB.xls
Set Pasientliste = Workbooks("Pasientliste.xls")
' IF Range("Q7").Value = B
Teamarbeid.Activate
Rows("25:25").Select
Selection.Insert Shift:=xlDown
Range("A5:AI5").Select
Selection.Copy
Range("A25:AI25").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Pasientliste.Activate
Range("A7:D7,F7:T7").Select
Range("A7").Activate
Selection.ClearContents
Teamarbeid.Close SaveChanges:=True
End If
End Sub
Would love to put in a pastespecial with all the conditional formats... but thats of secondary importance right now!
Anyone?
Last edited: