Hello. I'm new to macros, so im sorry if this is a silly question.
I have a macro:
This macro is placed in a module I've called "Oppdatering" and is working perfectly as long as i call it with a button. However, when i try to call it from the Sheet folder using Private Sub Worksheet_Change(ByVal Target As Range), Excel turns dead!
Here is the code
The code in the Sheet (Yes, I've now put it inn all Sheets just to make sure its working in the right sheet) The Cell "D7" in the Status Sheet is a drop down menu. I have allso had different Worksheet_SelectionChange codes that suddenly stopped working in different Workbooks?!
Ive allso tried the dummy
</PRE>... changing away with nothing happening..
Safety is put to low, working in Excel 2003.
What is going on here?
And by the way: How do you post the macros with the slider window?
I have a macro:
Rich (BB code):
Sub Oppdatering()
Dim i As Long
Dim Status As String
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Status = Sheets("Status").Range("D7").Value
Sheets("HK-oppfølging").Select
For i = 4 To 204 Step 25
If Range("D" & i) = Status Then
Sheets("HK-oppfølging").Range("A" & i - 2 & ":G" & i + 22).Copy Destination:=Sheets("Status").Range("B11:H35")
End If
Next i
Sheets("Status").Select
End Sub
This macro is placed in a module I've called "Oppdatering" and is working perfectly as long as i call it with a button. However, when i try to call it from the Sheet folder using Private Sub Worksheet_Change(ByVal Target As Range), Excel turns dead!
Here is the code
Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$7" Then
Call Oppdatering
End Sub
The code in the Sheet (Yes, I've now put it inn all Sheets just to make sure its working in the right sheet) The Cell "D7" in the Status Sheet is a drop down menu. I have allso had different Worksheet_SelectionChange codes that suddenly stopped working in different Workbooks?!
Ive allso tried the dummy
Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As Range)
Rich (BB code):
MsgBox "You just changed " & Target.Address
End Sub
</PRE>... changing away with nothing happening..
Safety is put to low, working in Excel 2003.
What is going on here?
And by the way: How do you post the macros with the slider window?
Last edited by a moderator: