Wie kan mij Helpen
Had 1 Macro
Eerst oude waarde onthouden B58
Daarna aflopen
Dat gaat goed
Nu volgende macro
Dus ik copyeer de oude en vul diverse gegevens is
Maar hij wil niet lopen
Hoe kan ik een 2e waarde B70 in de string houden
Echter ik wil de 2e makro er aan vastkoppelen
Als waarde B70 enz.enz
Hieronder de formule zoals ik hem nu heb
Dim strOldValue As String
Private Sub Worksheet_Activate()
strOldValue = Range("B58").Value
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
If Not Intersect(Target, Range("B58")) Is Nothing Then
If MsgBox("Wil je de gegevens vervangen ???", vbYesNo) = vbYes Then
strOldValue = Range("B58").Value
If Range("B58").Value = "Geen" Then Application.Run "MacroS"
If Range("B58").Value = "Aanvraag A" Then Application.Run "MacroA"
If Range("B58").Value = "Aanvraag B" Then Application.Run "MacroB"
If Range("B58").Value = "Aanvraag C" Then Application.Run "MacroC"
If Range("B58").Value = "Aanvraag D" Then Application.Run "MacroD"
Else
Range("B58").Value = strOldValue
End If
End If
Application.EnableEvents = True
End Sub
Dim strOldValue As String
strOldValue = Range("B70").Value
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
If Not Intersect(Target, Range("B70")) Is Nothing Then
If MsgBox("Wil je Printen ???", vbYesNo) = vbYes Then
strOldValue = Range("B70").Value
If Range("B70").Value = "Geen" Then Application.Run "MacroQ"
If Range("B70").Value = "Offerte Opdracht" Then Application.Run "MacroP"
If Range("B70").Value = "Extra Offerte-Opdracht" Then Application.Run "MacroE"
If Range("B70").Value = "Kale Offerte" Then Application.Run "MacroK"
If Range("B70").Value = "Extra Kale Offerte" Then Application.Run "MacroW"
Else
Range("B70").Value = strOldValue
End If
End If
Application.EnableEvents = True
End Sub
Wie ziet het probleem ????
Alvast bedankt
Had 1 Macro
Eerst oude waarde onthouden B58
Daarna aflopen
Dat gaat goed
Nu volgende macro
Dus ik copyeer de oude en vul diverse gegevens is
Maar hij wil niet lopen
Hoe kan ik een 2e waarde B70 in de string houden
Echter ik wil de 2e makro er aan vastkoppelen
Als waarde B70 enz.enz
Hieronder de formule zoals ik hem nu heb
Dim strOldValue As String
Private Sub Worksheet_Activate()
strOldValue = Range("B58").Value
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
If Not Intersect(Target, Range("B58")) Is Nothing Then
If MsgBox("Wil je de gegevens vervangen ???", vbYesNo) = vbYes Then
strOldValue = Range("B58").Value
If Range("B58").Value = "Geen" Then Application.Run "MacroS"
If Range("B58").Value = "Aanvraag A" Then Application.Run "MacroA"
If Range("B58").Value = "Aanvraag B" Then Application.Run "MacroB"
If Range("B58").Value = "Aanvraag C" Then Application.Run "MacroC"
If Range("B58").Value = "Aanvraag D" Then Application.Run "MacroD"
Else
Range("B58").Value = strOldValue
End If
End If
Application.EnableEvents = True
End Sub
Dim strOldValue As String
strOldValue = Range("B70").Value
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
If Not Intersect(Target, Range("B70")) Is Nothing Then
If MsgBox("Wil je Printen ???", vbYesNo) = vbYes Then
strOldValue = Range("B70").Value
If Range("B70").Value = "Geen" Then Application.Run "MacroQ"
If Range("B70").Value = "Offerte Opdracht" Then Application.Run "MacroP"
If Range("B70").Value = "Extra Offerte-Opdracht" Then Application.Run "MacroE"
If Range("B70").Value = "Kale Offerte" Then Application.Run "MacroK"
If Range("B70").Value = "Extra Kale Offerte" Then Application.Run "MacroW"
Else
Range("B70").Value = strOldValue
End If
End If
Application.EnableEvents = True
End Sub
Wie ziet het probleem ????
Alvast bedankt