Excel userform Run-time error '21474178 (80010108)': Automation error Object invoked has disconnected from its clients

lottrup

New Member
Joined
Mar 9, 2009
Messages
16
Hi,

I have a problem with a vba project created some time ago.

The project contains multiple userforms. On open a userform is shown, and based on some simple choices another userform is loaded. This is when the project gives the following error: Run-time error '21474178 (80010108)': Automation error Object invoked has disconnected from its clients.

The code for opening the second userform is as follows:
Code:
Private Sub CommandButton1_Click()
    If ComboBox2 = "" Then
        MsgBox ("Vælg service line")
    ElseIf ComboBox1 = "" Then
        MsgBox ("Vælg periode")
    ElseIf ComboBox3 = "" Then
        MsgBox ("Vælg version")
    Else
        Unload Me
        Main.Show
    End If
End Sub

The code behind the userform that should open is

Code:
Option Explicit
Private Sub CommandButton1_Click()
'Formål: Gemme indtastet data i database
'On Error GoTo ErrHandler
    
    Sheets("Beregninger").Cells(9, 4) = TextBox3.Value
    Sheets("Beregninger").Cells(10, 4) = TextBox6.Value
    Sheets("Beregninger").Cells(11, 4) = TextBox9.Value
    Sheets("Beregninger").Cells(12, 4) = TextBox12.Value
    Sheets("Beregninger").Cells(13, 4) = TextBox15.Value
    Sheets("Beregninger").Cells(14, 4) = TextBox91.Value
    Sheets("Beregninger").Cells(15, 4) = TextBox129.Value
    Sheets("Beregninger").Cells(16, 4) = TextBox132.Value
    Sheets("Beregninger").Cells(17, 4) = TextBox135.Value
    
    If Sheets("Beregninger").Cells(18, 4) = 100 Then
    
    Sheets("Database").Select
    
    Dim rng As Variant
    Dim j As Integer
    j = Entry - 6
    
'Administration
    'Mål
    Cells(Entry, Range("MKursushåndtering").Column) = TextBox1.Value
    Cells(Entry, Range("MTimeregistrering").Column) = TextBox4.Value
    Cells(Entry, Range("MFAS_koncept").Column) = TextBox7.Value
    Cells(Entry, Range("MGod_praksis").Column) = TextBox10.Value
    Cells(Entry, Range("MSagshåndtering").Column) = TextBox13.Value
    Cells(Entry, Range("MFFU").Column) = TextBox89.Value
    
    'Månedsmål
    Cells(Entry, Range("RKursushåndtering").Column) = TextBox173.Value
    Cells(Entry, Range("RTimeregistrering").Column) = TextBox174.Value
    Cells(Entry, Range("RFAS_koncept").Column) = TextBox175.Value
    Cells(Entry, Range("RGod_praksis").Column) = TextBox176.Value
    Cells(Entry, Range("RSagshåndtering").Column) = TextBox177.Value
    Cells(Entry, Range("RFFU").Column) = TextBox178.Value
    'Vægte
    Cells(Entry, Range("VKursushåndtering").Column) = TextBox3.Value
    Cells(Entry, Range("VTimeregistrering").Column) = TextBox6.Value
    Cells(Entry, Range("VFAS_koncept").Column) = TextBox9.Value
    Cells(Entry, Range("VGod_praksis").Column) = TextBox12.Value
    Cells(Entry, Range("VSagshåndtering").Column) = TextBox15.Value
    Cells(Entry, Range("VFFU").Column) = TextBox91.Value
    
    'Diverse
    Cells(Entry, Range("NAdmDiverse1").Column) = TextBox127.Value
    Cells(Entry, Range("NAdmDiverse2").Column) = TextBox130.Value
    Cells(Entry, Range("NAdmDiverse3").Column) = TextBox133.Value
    Cells(Entry, Range("MAdmDiverse1").Column) = TextBox128.Value
    Cells(Entry, Range("MAdmDiverse2").Column) = TextBox131.Value
    Cells(Entry, Range("MAdmDiverse3").Column) = TextBox134.Value
    Cells(Entry, Range("VAdmDiverse1").Column) = TextBox129.Value
    Cells(Entry, Range("VAdmDiverse2").Column) = TextBox132.Value
    Cells(Entry, Range("VAdmDiverse3").Column) = TextBox135.Value
    Cells(Entry, Range("RAdmDiverse1").Column) = TextBox179.Value
    Cells(Entry, Range("RAdmDiverse2").Column) = TextBox180.Value
    Cells(Entry, Range("RAdmDiverse3").Column) = TextBox172.Value
    
    
    MsgBox Prompt:="Indsatsplan - administration er gemt", Buttons:=vbInformation
    Call SaveWorkbookBackup
    Else
    MsgBox Prompt:="Vægte skal summe til 100%. Summen er nu " & Sheets("Beregninger").Cells(18, 4), Buttons:=vbCritical
    End If
'ErrHandler: MsgBox prompt:="Der er opstået en fejl", Buttons:=vbCritical

End Sub
Private Sub CommandButton10_Click()
Unload Me
End Sub
Private Sub CommandButton11_Click()
Unload Me
End Sub
Private Sub CommandButton12_Click()
Unload Me
End Sub
Private Sub CommandButton2_Click()
'Formål: Gemme indtastet data i database
    
    Sheets("Beregninger").Cells(21, 4) = TextBox24.Value
    Sheets("Beregninger").Cells(22, 4) = TextBox27.Value
    Sheets("Beregninger").Cells(23, 4) = TextBox30.Value
    Sheets("Beregninger").Cells(24, 4) = TextBox33.Value
    Sheets("Beregninger").Cells(25, 4) = TextBox36.Value
    Sheets("Beregninger").Cells(26, 4) = TextBox94.Value
    Sheets("Beregninger").Cells(27, 4) = TextBox97.Value
    Sheets("Beregninger").Cells(28, 4) = TextBox100.Value
    Sheets("Beregninger").Cells(29, 4) = TextBox124.Value
    Sheets("Beregninger").Cells(30, 4) = TextBox126.Value
    Sheets("Beregninger").Cells(31, 4) = TextBox39.Value
    Sheets("Beregninger").Cells(32, 4) = TextBox42.Value
    Sheets("Beregninger").Cells(33, 4) = TextBox45.Value
    Sheets("Beregninger").Cells(34, 4) = TextBox48.Value
    Sheets("Beregninger").Cells(35, 4) = TextBox51.Value
    Sheets("Beregninger").Cells(36, 4) = TextBox54.Value
    Sheets("Beregninger").Cells(37, 4) = TextBox84.Value
    Sheets("Beregninger").Cells(38, 4) = TextBox139.Value
    Sheets("Beregninger").Cells(39, 4) = TextBox142.Value
    Sheets("Beregninger").Cells(40, 4) = TextBox144.Value
    
    If Sheets("Beregninger").Cells(41, 4) = 100 Then
    Dim rng As Variant
    Dim j As Integer
    j = Entry - 6
    'Marked
    'Mål
    Cells(Entry, Range("MMøder_kunder__I").Column) = TextBox22.Value
    Cells(Entry, Range("MMøder_kunder__P_E").Column) = TextBox25.Value
    Cells(Entry, Range("MMøder_emner__I").Column) = TextBox28.Value
    Cells(Entry, Range("MMøder_emner__P_E").Column) = TextBox31.Value
    Cells(Entry, Range("MLeads_Deloitte").Column) = TextBox34.Value
    Cells(Entry, Range("MLeads_FAS").Column) = TextBox92.Value
    Cells(Entry, Range("MVærdi_af_leads_Deloitte").Column) = TextBox95.Value
    Cells(Entry, Range("MVærdi_af_leads_FAS").Column) = TextBox98.Value
    Cells(Entry, Range("MRealiseret_leads_Deloitte").Column) = TextBox123.Value
    Cells(Entry, Range("MRealiseret_leads_FAS").Column) = TextBox125.Value
    Cells(Entry, Range("MDeltagelse_netværk__internt").Column) = TextBox37.Value
    Cells(Entry, Range("MDeltagelse_netværk__eksternt").Column) = TextBox40.Value
    Cells(Entry, Range("MMandater_værdi").Column) = TextBox43.Value
    Cells(Entry, Range("MPipeline_værdi").Column) = TextBox46.Value
    Cells(Entry, Range("MKrydssalg_Deloitte").Column) = TextBox49.Value
    Cells(Entry, Range("MKrydssalg_FAS").Column) = TextBox52.Value
    Cells(Entry, Range("MKundetilfredshed").Column) = TextBox82.Value
    'Månedsmål
    Cells(Entry, Range("RMøder_kunder__I").Column) = TextBox181.Value
    Cells(Entry, Range("RMøder_kunder__P_E").Column) = TextBox182.Value
    Cells(Entry, Range("RMøder_emner__I").Column) = TextBox183.Value
    Cells(Entry, Range("RMøder_emner__P_E").Column) = TextBox184.Value
    Cells(Entry, Range("RLeads_Deloitte").Column) = TextBox185.Value
    Cells(Entry, Range("RLeads_FAS").Column) = TextBox189.Value
    Cells(Entry, Range("RVærdi_af_leads_Deloitte").Column) = TextBox191.Value
    Cells(Entry, Range("RVærdi_af_leads_FAS").Column) = TextBox190.Value
    Cells(Entry, Range("RRealiseret_leads_Deloitte").Column) = TextBox192.Value
    Cells(Entry, Range("RRealiseret_leads_FAS").Column) = TextBox193.Value
    Cells(Entry, Range("RDeltagelse_netværk__internt").Column) = TextBox186.Value
    Cells(Entry, Range("RDeltagelse_netværk__eksternt").Column) = TextBox187.Value
    Cells(Entry, Range("RMandater_værdi").Column) = TextBox188.Value
    Cells(Entry, Range("RPipeline_værdi").Column) = TextBox195.Value
    Cells(Entry, Range("RKrydssalg_Deloitte").Column) = TextBox196.Value
    Cells(Entry, Range("RKrydssalg_FAS").Column) = TextBox197.Value
    Cells(Entry, Range("RKundetilfredshed").Column) = TextBox198.Value
    
    'Vægt
    Cells(Entry, Range("VMøder_kunder__I").Column) = TextBox24.Value
    Cells(Entry, Range("VMøder_kunder__P_E").Column) = TextBox27.Value
    Cells(Entry, Range("VMøder_emner__I").Column) = TextBox30.Value
    Cells(Entry, Range("VMøder_emner__P_E").Column) = TextBox33.Value
    Cells(Entry, Range("VLeads_Deloitte").Column) = TextBox36.Value
    Cells(Entry, Range("VLeads_FAS").Column) = TextBox94.Value
    Cells(Entry, Range("VVærdi_af_leads_Deloitte").Column) = TextBox97.Value
    Cells(Entry, Range("VVærdi_af_leads_FAS").Column) = TextBox100.Value
    Cells(Entry, Range("VRealiseret_leads_Deloitte").Column) = TextBox124.Value
    Cells(Entry, Range("VRealiseret_leads_FAS").Column) = TextBox126.Value
    Cells(Entry, Range("VDeltagelse_netværk__internt").Column) = TextBox39.Value
    Cells(Entry, Range("VDeltagelse_netværk__eksternt").Column) = TextBox42.Value
    Cells(Entry, Range("VMandater_værdi").Column) = TextBox45.Value
    Cells(Entry, Range("VPipeline_værdi").Column) = TextBox48.Value
    Cells(Entry, Range("VKrydssalg_Deloitte").Column) = TextBox51.Value
    Cells(Entry, Range("VKrydssalg_FAS").Column) = TextBox54.Value
    Cells(Entry, Range("VKundetilfredshed").Column) = TextBox84.Value
    
    'Diverse
    Cells(Entry, Range("NMarDiverse1").Column) = TextBox137.Value
    Cells(Entry, Range("NMarDiverse2").Column) = TextBox140.Value
    Cells(Entry, Range("NMarDiverse3").Column) = TextBox136.Value
    Cells(Entry, Range("MMarDiverse1").Column) = TextBox138.Value
    Cells(Entry, Range("MMarDiverse2").Column) = TextBox141.Value
    Cells(Entry, Range("MMarDiverse3").Column) = TextBox143.Value
    Cells(Entry, Range("VMarDiverse1").Column) = TextBox139.Value
    Cells(Entry, Range("VMarDiverse2").Column) = TextBox142.Value
    Cells(Entry, Range("VMarDiverse3").Column) = TextBox144.Value
    Cells(Entry, Range("RMarDiverse1").Column) = TextBox199.Value
    Cells(Entry, Range("RMarDiverse2").Column) = TextBox200.Value
    Cells(Entry, Range("RMarDiverse3").Column) = TextBox194.Value
    
    MsgBox Prompt:="Indsatsplan - marked er gemt", Buttons:=vbInformation
    Call SaveWorkbookBackup
    Else
    MsgBox Prompt:="Vægte skal summe til 100%. Summen er nu " & Sheets("Beregninger").Cells(41, 4), Buttons:=vbCritical
    End If
    
End Sub
Private Sub CommandButton3_Click()
'Formål: Gemme indtastet data i database
    Sheets("Beregninger").Cells(44, 4) = TextBox57.Value
    Sheets("Beregninger").Cells(45, 4) = TextBox60.Value
    Sheets("Beregninger").Cells(46, 4) = TextBox63.Value
    Sheets("Beregninger").Cells(47, 4) = TextBox66.Value
    Sheets("Beregninger").Cells(48, 4) = TextBox69.Value
    Sheets("Beregninger").Cells(49, 4) = TextBox116.Value
    Sheets("Beregninger").Cells(50, 4) = TextBox119.Value
    Sheets("Beregninger").Cells(51, 4) = TextBox122.Value
    Sheets("Beregninger").Cells(52, 4) = TextBox157.Value
    Sheets("Beregninger").Cells(53, 4) = TextBox160.Value
    Sheets("Beregninger").Cells(54, 4) = TextBox162.Value
    
    If Sheets("Beregninger").Cells(55, 4) = 100 Then
    
    Sheets("Database").Select
    
    Dim rng As Variant
    Dim j As Integer
    j = Entry - 6
    
    'Ledelse
    'Mål
    Cells(Entry, Range("MJobvurderinger").Column) = TextBox55.Value
    Cells(Entry, Range("MPM_samtale").Column) = TextBox58.Value
    Cells(Entry, Range("MRetention_rate").Column) = TextBox61.Value
    Cells(Entry, Range("MÉn_til_én_samtaler").Column) = TextBox64.Value
    Cells(Entry, Range("MKlimamåling").Column) = TextBox67.Value
    Cells(Entry, Range("MMålopfyldelse_for_salgsteam").Column) = TextBox114.Value
    Cells(Entry, Range("MRating_fra_360_graders_review").Column) = TextBox117.Value
    Cells(Entry, Range("MRating_fra_kundeundersøgelser__samlet_team_rating").Column) = TextBox120.Value
    
    'Månedsmål
    Cells(Entry, Range("RJobvurderinger").Column) = TextBox208.Value
    Cells(Entry, Range("RPM_samtale").Column) = TextBox209.Value
    Cells(Entry, Range("RRetention_rate").Column) = TextBox210.Value
    Cells(Entry, Range("RÉn_til_én_samtaler").Column) = TextBox211.Value
    Cells(Entry, Range("RKlimamåling").Column) = TextBox212.Value
    Cells(Entry, Range("RMålopfyldelse_for_salgsteam").Column) = TextBox213.Value
    Cells(Entry, Range("RRating_fra_360_graders_review").Column) = TextBox214.Value
    Cells(Entry, Range("RRating_fra_kundeundersøgelser__samlet_team_rating").Column) = TextBox215.Value
    
    
    'Vægte
    Cells(Entry, Range("VJobvurderinger").Column) = TextBox57.Value
    Cells(Entry, Range("VPM_samtale").Column) = TextBox60.Value
    Cells(Entry, Range("VRetention_rate").Column) = TextBox63.Value
    Cells(Entry, Range("VÉn_til_én_samtaler").Column) = TextBox66.Value
    Cells(Entry, Range("VKlimamåling").Column) = TextBox69.Value
    Cells(Entry, Range("VMålopfyldelse_for_salgsteam").Column) = TextBox116.Value
    Cells(Entry, Range("VRating_fra_360_graders_review").Column) = TextBox119.Value
    Cells(Entry, Range("VRating_fra_kundeundersøgelser__samlet_team_rating").Column) = TextBox122.Value
    
    'Diverse
    Cells(Entry, Range("NLedDiverse1").Column) = TextBox155.Value
    Cells(Entry, Range("NLedDiverse2").Column) = TextBox158.Value
    Cells(Entry, Range("NLedDiverse3").Column) = TextBox154.Value
    Cells(Entry, Range("MLedDiverse1").Column) = TextBox156.Value
    Cells(Entry, Range("MLedDiverse2").Column) = TextBox159.Value
    Cells(Entry, Range("MLedDiverse3").Column) = TextBox161.Value
    Cells(Entry, Range("VLedDiverse1").Column) = TextBox157.Value
    Cells(Entry, Range("VLedDiverse2").Column) = TextBox160.Value
    Cells(Entry, Range("VLedDiverse3").Column) = TextBox162.Value
    Cells(Entry, Range("RLedDiverse1").Column) = TextBox216.Value
    Cells(Entry, Range("RLedDiverse2").Column) = TextBox217.Value
    Cells(Entry, Range("RLedDiverse3").Column) = TextBox218.Value
    
    
    MsgBox Prompt:="Indsatsplan - ledelse er gemt", Buttons:=vbInformation
    Call SaveWorkbookBackup
    Else
    MsgBox Prompt:="Vægte skal summe til 100%. Summen er nu " & Sheets("Beregninger").Cells(55, 4), Buttons:=vbCritical
    End If
End Sub
Private Sub CommandButton4_Click()
'Formål: Gemme indtastet data i database
    
    Sheets("Beregninger").Cells(58, 4) = TextBox72.Value
    Sheets("Beregninger").Cells(59, 4) = TextBox75.Value
    Sheets("Beregninger").Cells(60, 4) = TextBox78.Value
    Sheets("Beregninger").Cells(61, 4) = TextBox81.Value
    Sheets("Beregninger").Cells(62, 4) = TextBox166.Value
    Sheets("Beregninger").Cells(63, 4) = TextBox169.Value
    Sheets("Beregninger").Cells(64, 4) = TextBox171.Value
    
    If Sheets("Beregninger").Cells(65, 4) = 100 Then
    
    Sheets("Database").Select
    
    Dim rng As Variant
    Dim j As Integer
    j = Entry - 6
    
    'Økonomi
    'Mål
    Cells(Entry, Range("MOmsætning").Column) = TextBox70.Value
    Cells(Entry, Range("MDBIII").Column) = TextBox73.Value
    Cells(Entry, Range("MFakturering").Column) = TextBox76.Value
    Cells(Entry, Range("MDebitorstyring").Column) = TextBox79.Value
    
    'Månedsmål
    Cells(Entry, Range("ROmsætning").Column) = TextBox220.Value
    Cells(Entry, Range("RDBIII").Column) = TextBox221.Value
    Cells(Entry, Range("RFakturering").Column) = TextBox222.Value
    Cells(Entry, Range("RDebitorstyring").Column) = TextBox223.Value
    
    'Vægte
    Cells(Entry, Range("VOmsætning").Column) = TextBox72.Value
    Cells(Entry, Range("VDBIII").Column) = TextBox75.Value
    Cells(Entry, Range("VFakturering").Column) = TextBox78.Value
    Cells(Entry, Range("VDebitorstyring").Column) = TextBox81.Value
    
    'Diverse
    Cells(Entry, Range("NØkoDiverse1").Column) = TextBox164.Value
    Cells(Entry, Range("NØkoDiverse2").Column) = TextBox167.Value
    Cells(Entry, Range("NØkoDiverse3").Column) = TextBox163.Value
    Cells(Entry, Range("MØkoDiverse1").Column) = TextBox165.Value
    Cells(Entry, Range("MØkoDiverse2").Column) = TextBox168.Value
    Cells(Entry, Range("MØkoDiverse3").Column) = TextBox170.Value
    Cells(Entry, Range("VØkoDiverse1").Column) = TextBox166.Value
    Cells(Entry, Range("VØkoDiverse2").Column) = TextBox169.Value
    Cells(Entry, Range("VØkoDiverse3").Column) = TextBox171.Value
    Cells(Entry, Range("RØkoDiverse1").Column) = TextBox224.Value
    Cells(Entry, Range("RØkoDiverse2").Column) = TextBox225.Value
    Cells(Entry, Range("RØkoDiverse3").Column) = TextBox219.Value
    
    MsgBox Prompt:="Indsatsplan - økonomi er gemt", Buttons:=vbInformation
    Call SaveWorkbookBackup
    Else
    MsgBox Prompt:="Vægte skal summe til 100%. Summen er nu " & Sheets("Beregninger").Cells(65, 4), Buttons:=vbCritical
    End If
End Sub
Private Sub CommandButton5_Click()
    Sheets("Beregninger").Cells(79, 4) = TextBox85.Value
    Sheets("Beregninger").Cells(80, 4) = TextBox86.Value
    Sheets("Beregninger").Cells(81, 4) = TextBox87.Value
    Sheets("Beregninger").Cells(82, 4) = TextBox88.Value
    Sheets("Beregninger").Cells(83, 4) = TextBox110.Value
    
    If Sheets("Beregninger").Cells(84, 4) = 100 Then
        Cells(Entry, Range("VAdministration").Column) = TextBox85.Value
        Cells(Entry, Range("VMarked").Column) = TextBox86.Value
        Cells(Entry, Range("VLedelse").Column) = TextBox87.Value
        Cells(Entry, Range("VØkonomi").Column) = TextBox88.Value
        Cells(Entry, Range("VægtProduktion").Column) = TextBox110.Value
                
        Cells(Entry, Range("RAdministration").Column) = ComboBox1.Value
        Cells(Entry, Range("RMarked").Column) = ComboBox2.Value
        Cells(Entry, Range("RLedelse").Column) = ComboBox4.Value
        Cells(Entry, Range("RØkonomi").Column) = ComboBox5.Value
        Cells(Entry, Range("RProduktionSamlet").Column) = ComboBox3.Value
        
        
        MsgBox "Samlet vurdering gemt", vbInformation
        Call SaveWorkbookBackup
    Else
        MsgBox Prompt:="Vægte skal summe til 100%. Summen er nu " & Sheets("Beregninger").Cells(84, 4), Buttons:=vbCritical
    End If
End Sub
Private Sub CommandButton6_Click()
    'Formål: Gemme indtastet data i database
    
    Sheets("Beregninger").Cells(68, 4) = TextBox21.Value
    Sheets("Beregninger").Cells(69, 4) = TextBox103.Value
    Sheets("Beregninger").Cells(70, 4) = TextBox106.Value
    Sheets("Beregninger").Cells(71, 4) = TextBox109.Value
    Sheets("Beregninger").Cells(72, 4) = TextBox148.Value
    Sheets("Beregninger").Cells(73, 4) = TextBox151.Value
    Sheets("Beregninger").Cells(74, 4) = TextBox153.Value
    
    If Sheets("Beregninger").Cells(75, 4) = 100 Then
    
    Sheets("Database").Select
    
    Dim rng As Variant
    Dim j As Integer
    j = Entry - 6
    
    'Produktion
    'Mål
    Cells(Entry, Range("MProduktion").Column) = TextBox19.Value
    Cells(Entry, Range("MLevKunde").Column) = TextBox101.Value
    Cells(Entry, Range("MLevJob").Column) = TextBox104.Value
    Cells(Entry, Range("MLevPeriode").Column) = TextBox107.Value
    
    'Månedsmål
    Cells(Entry, Range("RProduktion").Column) = TextBox205.Value
    Cells(Entry, Range("RLevKunde").Column) = TextBox202.Value
    Cells(Entry, Range("RLevJob").Column) = TextBox203.Value
    Cells(Entry, Range("RLevPeriode").Column) = TextBox204.Value
    
    'Vægte
    Cells(Entry, Range("VProduktion").Column) = TextBox21.Value
    Cells(Entry, Range("VLevKunde").Column) = TextBox103.Value
    Cells(Entry, Range("VLevJob").Column) = TextBox106.Value
    Cells(Entry, Range("VLevPeriode").Column) = TextBox109.Value
    
    'Diverse
    Cells(Entry, Range("NProDiverse1").Column) = TextBox146.Value
    Cells(Entry, Range("NProDiverse2").Column) = TextBox149.Value
    Cells(Entry, Range("NProDiverse3").Column) = TextBox145.Value
    Cells(Entry, Range("MProDiverse1").Column) = TextBox147.Value
    Cells(Entry, Range("MProDiverse2").Column) = TextBox150.Value
    Cells(Entry, Range("MProDiverse3").Column) = TextBox152.Value
    Cells(Entry, Range("VProDiverse1").Column) = TextBox148.Value
    Cells(Entry, Range("VProDiverse2").Column) = TextBox151.Value
    Cells(Entry, Range("VProDiverse3").Column) = TextBox153.Value
    Cells(Entry, Range("RProDiverse1").Column) = TextBox206.Value
    Cells(Entry, Range("RProDiverse2").Column) = TextBox207.Value
    Cells(Entry, Range("RProDiverse3").Column) = TextBox201.Value
    
    MsgBox Prompt:="Indsatsplan - produktion er gemt", Buttons:=vbInformation
    Call SaveWorkbookBackup
    Else
    MsgBox Prompt:="Vægte skal summe til 100%. Summen er nu " & Sheets("Beregninger").Cells(75, 4), Buttons:=vbCritical
    End If
End Sub
Private Sub CommandButton7_Click()
Unload Me
End Sub
Private Sub CommandButton8_Click()
Unload Me
End Sub
Private Sub CommandButton9_Click()
Unload Me
End Sub
Private Sub Image1_Click()
MsgBox "Målepunkter: " & vbNewLine & "Kursusgebyr som følge af afmelding (=0)" & vbNewLine & "Kvalificeret kursustilmelding på baggrund af udviklingsplan.", vbInformation
End Sub
Private Sub Image10_Click()
MsgBox "Målepunkter: " & vbNewLine & "Antal møder med nye emner (I).", vbInformation
End Sub
Private Sub Image100_Click()
Col = Range("MProDiverse1").Column
Comment.Show
End Sub
Private Sub Image101_Click()
Col = Range("MProDiverse2").Column
Comment.Show
End Sub
Private Sub Image105_Click()
Col = Range("MLedDiverse3").Column
Comment.Show
End Sub
Private Sub Image106_Click()
Col = Range("MLedDiverse1").Column
Comment.Show
End Sub
Private Sub Image107_Click()
Col = Range("MLedDiverse2").Column
Comment.Show
End Sub
Private Sub Image11_Click()
MsgBox "Målepunkter: " & vbNewLine & "Værdi af projekter i pipeline.", vbInformation
End Sub
Private Sub Image111_Click()
Col = Range("MØkoDiverse3").Column
Comment.Show
End Sub
Private Sub Image112_Click()
Col = Range("MØkoDiverse1").Column
Comment.Show
End Sub
Private Sub Image113_Click()
Col = Range("MØkoDiverse2").Column
Comment.Show
End Sub
Private Sub Image12_Click()
MsgBox "Målepunkter: " & vbNewLine & "Antal leads, der er leveret til Deloitte", vbInformation
End Sub
Private Sub Image13_Click()
MsgBox "Målepunkter: " & vbNewLine & "Antal interne netværksmøder der er deltaget i.", vbInformation
End Sub
Private Sub Image14_Click()
MsgBox "Målepunkter: " & vbNewLine & "Antal eksterne netværksmøder der er deltaget i.", vbInformation
End Sub
Private Sub Image15_Click()
MsgBox "Målepunkter: " & vbNewLine & "Værdi af mandaterede projekter.", vbInformation
End Sub
Private Sub Image16_Click()
MsgBox "Målepunkter: " & vbNewLine & "Alle kunder med honorar over 30 k Euro skal have en kundetilfredshedsanalyse. Her angivet i procenter.", vbInformation
End Sub
Private Sub Image19_Click()
MsgBox "Målepunkter: " & vbNewLine & "Krydssalg i procent af FAS' samlede omsætning (dækker både ind- og udgående krydssalg).", vbInformation
End Sub
Private Sub Image2_Click()
MsgBox "Målepunkter: " & vbNewLine & "Rettidig aflevering af timeregistrering mandag inden 12.00.", vbInformation
End Sub
Private Sub Image20_Click()
MsgBox "Målepunkter: " & vbNewLine & "FAS track i udvalgte sektorer.", vbInformation
End Sub
Private Sub Image21_Click()
MsgBox "Målepunkter: " & vbNewLine & "Gennemføres hvert 2. år. Målepunkter fastlægges for ledere.", vbInformation
End Sub
Private Sub Image22_Click()
MsgBox "Målepunkter: " & vbNewLine & "Krav: Min. 5 op/nedadgående job- eller periodevurderinger pr. halvår.", vbInformation
End Sub
Private Sub Image23_Click()
MsgBox "Målepunkter: " & vbNewLine & "Krav: Min. 2 strukturerede samtaler årligt (vinter/sommer), der følger de ad Deloitte udstrukne regler.", vbInformation
End Sub
Private Sub Image24_Click()
MsgBox "Målepunkter: " & vbNewLine & "Fastholdelse af kernemedarbejdere (band 1-3) målt i procent.", vbInformation
End Sub
Private Sub Image25_Click()
MsgBox "Målepunkter: " & vbNewLine & "Opfølgnings- og udviklingssamtaler baseret på nærværende værktøj.", vbInformation
End Sub
Private Sub Image26_Click()
MsgBox "Målepunkter: " & vbNewLine & "Ingen debitorer over 90 dage. Dermed er målet givet ved anddel debitorer mindre end 90 dage.", vbInformation
End Sub
Private Sub Image27_Click()
MsgBox "Målepunkter: " & vbNewLine & "Omsætning", vbInformation
End Sub
Private Sub Image28_Click()
MsgBox "Målepunkter: " & vbNewLine & "DBIII", vbInformation
End Sub
Private Sub Image29_Click()
MsgBox "Målepunkter: " & vbNewLine & "Fakturering i henhold til koncernkrav på månedsbasis. 65% krav håndhæves.", vbInformation
End Sub
Private Sub Image3_Click()
MsgBox "Målepunkter: " & vbNewLine & "Indsigt i, forståelse og anvendelse af FAS-koncept.", vbInformation
End Sub
Private Sub Image30_Click()
MsgBox "Målepunkter: " & vbNewLine & "Min. 20 timer pr. år" & vbNewLine & "Min 120 timer pr. 3-års periode", vbInformation
End Sub
Private Sub Image31_Click()
MsgBox "Målepunkter: " & vbNewLine & "Antal leads leveret til FAS", vbInformation
End Sub
Private Sub Image32_Click()
MsgBox "Målepunkter: " & vbNewLine & "Værdi af leads leveret til Deloitte", vbInformation
End Sub
Private Sub Image33_Click()
MsgBox "Målepunkter: " & vbNewLine & "Værdi af leads leveret til FAS", vbInformation
End Sub
Private Sub Image34_Click()
Col = Range("MKursushåndtering").Column
Comment.Show
End Sub
Private Sub Image35_Click()
Col = Range("MTimeregistrering").Column
Comment.Show
End Sub
Private Sub Image36_Click()
Col = Range("MFAS_koncept").Column
Comment.Show
End Sub
Private Sub Image37_Click()
Col = Range("MGod_praksis").Column
Comment.Show
End Sub
Private Sub Image38_Click()
Col = Range("MSagshåndtering").Column
Comment.Show
End Sub
Private Sub Image39_Click()
Col = Range("MFFU").Column
Comment.Show
End Sub
Private Sub Image4_Click()
MsgBox "Målepunkter: " & vbNewLine & "Varsel i forbindelse med opgaveløsning med hjælp fra andre" & vbNewLine & "Grundholdninger" & vbNewLine & "Lån og tilbagelevering af diverse materialer (projektor, p-kort mm.).", vbInformation
End Sub
Private Sub Image40_Click()
Col = Range("MLeads_Deloitte").Column
Comment.Show
End Sub
Private Sub Image41_Click()
Col = Range("MProduktion").Column
Comment.Show
End Sub
Private Sub Image42_Click()
Col = Range("MMøder_kunder__I").Column
Comment.Show
End Sub
Private Sub Image43_Click()
Col = Range("MMøder_kunder__P_E").Column
Comment.Show
End Sub
Private Sub Image44_Click()
Col = Range("MMøder_emner__I").Column
Comment.Show
End Sub
Private Sub Image45_Click()
Col = Range("MMøder_emner__P_E").Column
Comment.Show
End Sub
Private Sub Image46_Click()
Col = Range("MMandater_værdi").Column
Comment.Show
End Sub
Private Sub Image47_Click()
Col = Range("MLeads_FAS").Column
Comment.Show
End Sub
Private Sub Image48_Click()
Col = Range("MVærdi_af_leads_Deloitte").Column
Comment.Show
End Sub
Private Sub Image49_Click()
Col = Range("MVærdi_af_leads_FAS").Column
Comment.Show
End Sub
Private Sub Image5_Click()
MsgBox "Målepunkter: " & vbNewLine & "Oprettelse og styring af sager i henhold til FAS koncept.", vbInformation
End Sub
Private Sub Image50_Click()
Col = Range("MDeltagelse_netværk__internt").Column
Comment.Show
End Sub
Private Sub Image51_Click()
Col = Range("MDeltagelse_netværk__eksternt").Column
Comment.Show
End Sub
Private Sub Image52_Click()
Col = Range("MKundetilfredshed").Column
Comment.Show
End Sub
Private Sub Image53_Click()
Col = Range("MPipeline_værdi").Column
Comment.Show
End Sub
Private Sub Image54_Click()
Col = Range("MKrydssalg_Deloitte").Column
Comment.Show
End Sub
Private Sub Image55_Click()
Col = Range("MKrydssalg_FAS").Column
Comment.Show
End Sub
Private Sub Image57_Click()
Col = Range("MJobvurderinger").Column
Comment.Show
End Sub
Private Sub Image58_Click()
Col = Range("MPM_samtale").Column
Comment.Show
End Sub
Private Sub Image59_Click()
Col = Range("MRetention_rate").Column
Comment.Show
End Sub
Private Sub Image6_Click()
MsgBox "Målepunkter: " & vbNewLine & "Antal møder med nye emner (P/E).", vbInformation
End Sub
Private Sub Image60_Click()
Col = Range("MÉn_til_én_samtaler").Column
Comment.Show
End Sub
Private Sub Image61_Click()
Col = Range("MKlimamåling").Column
Comment.Show
End Sub
Private Sub Image62_Click()
Col = Range("MDebitorstyring").Column
Comment.Show
End Sub
Private Sub Image63_Click()
Col = Range("MOmsætning").Column
Comment.Show
End Sub
Private Sub Image64_Click()
Col = Range("MDBIII").Column
Comment.Show
End Sub
Private Sub Image65_Click()
Col = Range("MFakturering").Column
Comment.Show
End Sub
Private Sub Image66_Click()
MsgBox "Målepunkter: " & vbNewLine & "Gennemsnit af vurderinger skal være over average", vbInformation
End Sub
Private Sub Image67_Click()
MsgBox "Målepunkter: " & vbNewLine & "Gennemsnit af vurderinger skal være over average", vbInformation
End Sub
Private Sub Image68_Click()
MsgBox "Målepunkter: " & vbNewLine & "Gennemsnit af vurderinger skal være over average", vbInformation
End Sub
Private Sub Image69_Click()
Col = Range("MLevKunde").Column
Comment.Show
End Sub
Private Sub Image7_Click()
MsgBox "Målepunkter: " & vbNewLine & "Antal arbejdstimer", vbInformation
End Sub
Private Sub Image72_Click()
    Sheets("Udvikling").Select
    Range("A7:T71").Select
    Call PrintSelectedCells
End Sub
Private Sub Image73_Click()
Col = Range("MRealiseret_omsætning").Column
Comment.Show
End Sub
Private Sub Image70_Click()
Col = Range("MJobvurderinger").Column
Comment.Show
End Sub
Private Sub Image71_Click()
Col = Range("MPeriodevurderinger").Column
Comment.Show
End Sub
Private Sub Image77_Click()
Col = Range("MMålopfyldelse_for_salgsteam").Column
Comment.Show
End Sub
Private Sub Image78_Click()
Col = Range("MRating_fra_360_graders_review").Column
Comment.Show
End Sub
Private Sub Image79_Click()
Col = Range("MRating_fra_kundeundersøgelser__samlet_team_rating").Column
Comment.Show
End Sub
Private Sub Image8_Click()
MsgBox "Målepunkter: " & vbNewLine & "Antal møder med eksisterende kunder (I)", vbInformation
End Sub
Private Sub Image81_Click()
Col = Range("MRealiseret_Leads_Deloitte").Column
Comment.Show
End Sub
Private Sub Image83_Click()
Col = Range("MRealiseret_Leads_Deloitte").Column
Comment.Show
End Sub
Private Sub Image85_Click()
Col = Range("MAdmDiverse1").Column
Comment.Show
End Sub
Private Sub Image87_Click()
Col = Range("MAdmDiverse2").Column
Comment.Show
End Sub
Private Sub Image89_Click()
Col = Range("MAdmDiverse3").Column
Comment.Show
End Sub
Private Sub Image9_Click()
MsgBox "Målepunkter: " & vbNewLine & "Antal møder med eksisterende kunder (P/E)", vbInformation
End Sub
 
 
 
Private Sub Image91_Click()
Col = Range("MMarDiverse1").Column
Comment.Show
End Sub
Private Sub Image93_Click()
Col = Range("MMarDiverse2").Column
Comment.Show
End Sub
Private Sub Image95_Click()
Col = Range("MMarDiverse3").Column
Comment.Show
End Sub
Private Sub Image99_Click()
Col = Range("MProDiverse3").Column
Comment.Show
End Sub
Private Sub UserForm_Activate()
   'Name of the frame
   With Me.Frame1
        'This will create a vertical scrollbar
        .ScrollBars = fmScrollBarsVertical
        
        'Change the values of 2 as Permission your requirements
        .ScrollHeight = .InsideHeight * 1.7
        .ScrollWidth = .InsideWidth * 9
    End With
End Sub
Private Sub UserForm_Initialize()
    Sheets("Database").Select
    'Sæt øverste label til noget passende
    If ActiveSheet.Cells(Entry, 1) = 1 Then
        Label73 = "Indsatsplan for FAS - " & ActiveSheet.Cells(Entry, 6) & " (" & ActiveSheet.Cells(Entry, 4) & ")"
    ElseIf Cells(Entry, 1) = 2 Then
        Label73 = "Indsatsplan for " & ActiveSheet.Cells(Entry, 5) & " - " & ActiveSheet.Cells(Entry, 6) & " (" & ActiveSheet.Cells(Entry, 4) & ")"
    Else
        Label73 = "Indsatsplan for " & ActiveSheet.Cells(Entry, 2) & ", " & ActiveSheet.Cells(Entry, 5) & " - " & ActiveSheet.Cells(Entry, 6) & " (" & ActiveSheet.Cells(Entry, 4) & ")"
    End If
    
    Dim rng As Variant
    Dim j As Integer    'Indgang (Entry) til brug for ranges
    
    j = Entry - 6
    
    Me.Height = Application.Height
    Me.Width = Application.Width
    
    MultiPage1.Left = Me.Width / 2 - MultiPage1.Width / 2
    Label73.Left = Me.Width / 2 - Label73.Width / 2
        
    'Administration
    'Mål
    rng = Range("MKursushåndtering")
    TextBox1 = rng(j, 1)
    rng = Range("MTimeregistrering")
    TextBox4 = rng(j, 1)
    rng = Range("MFAS_koncept")
    TextBox7 = rng(j, 1)
    rng = Range("MGod_praksis")
    TextBox10 = rng(j, 1)
    rng = Range("MSagshåndtering")
    TextBox13 = rng(j, 1)
    rng = Range("MFFU")
    TextBox89 = rng(j, 1)
    
    'Månedsmål
    rng = Range("RKursushåndtering")
    TextBox173 = rng(j, 1)
    rng = Range("RTimeregistrering")
    TextBox174 = rng(j, 1)
    rng = Range("RFAS_koncept")
    TextBox175 = rng(j, 1)
    rng = Range("RGod_praksis")
    TextBox176 = rng(j, 1)
    rng = Range("RSagshåndtering")
    TextBox177 = rng(j, 1)
    rng = Range("RFFU")
    TextBox178 = rng(j, 1)
    
    'Diverse-felter Adm
    rng = Range("NAdmDiverse1")
    TextBox127 = rng(j, 1)
    rng = Range("NAdmDiverse2")
    TextBox130 = rng(j, 1)
    rng = Range("NAdmDiverse3")
    TextBox133 = rng(j, 1)
    rng = Range("MAdmDiverse1")
    TextBox128 = rng(j, 1)
    rng = Range("MAdmDiverse2")
    TextBox131 = rng(j, 1)
    rng = Range("MAdmDiverse3")
    TextBox134 = rng(j, 1)
    rng = Range("VAdmDiverse1")
    TextBox129 = rng(j, 1)
    rng = Range("VAdmDiverse2")
    TextBox132 = rng(j, 1)
    rng = Range("VAdmDiverse3")
    TextBox135 = rng(j, 1)
    rng = Range("RAdmDiverse1")
    TextBox179 = rng(j, 1)
    rng = Range("RAdmDiverse2")
    TextBox180 = rng(j, 1)
    rng = Range("RAdmDiverse3")
    TextBox172 = rng(j, 1)
    
    'Vægte
    rng = Range("VKursushåndtering")
    TextBox3 = rng(j, 1)
    rng = Range("VTimeregistrering")
    TextBox6 = rng(j, 1)
    rng = Range("VFAS_koncept")
    TextBox9 = rng(j, 1)
    rng = Range("VGod_praksis")
    TextBox12 = rng(j, 1)
    rng = Range("VSagshåndtering")
    TextBox15 = rng(j, 1)
    rng = Range("VFFU")
    TextBox91 = rng(j, 1)
    
    'Marked
    'Mål
    rng = Range("MProduktion")
    TextBox19 = rng(j, 1)
    rng = Range("MMøder_kunder__I")
    TextBox22 = rng(j, 1)
    rng = Range("MMøder_kunder__P_E")
    TextBox25 = rng(j, 1)
    rng = Range("MMøder_emner__I")
    TextBox28 = rng(j, 1)
    rng = Range("MMøder_emner__P_E")
    TextBox31 = rng(j, 1)
    rng = Range("MLeads_Deloitte")
    TextBox34 = rng(j, 1)
    rng = Range("MLeads_FAS")
    TextBox92 = rng(j, 1)
    rng = Range("MVærdi_af_leads_Deloitte")
    TextBox95 = rng(j, 1)
    rng = Range("MVærdi_af_leads_FAS")
    TextBox98 = rng(j, 1)
    rng = Range("MRealiseret_leads_Deloitte")
    TextBox123 = rng(j, 1)
    rng = Range("MRealiseret_leads_FAS")
    TextBox125 = rng(j, 1)
    rng = Range("MDeltagelse_netværk__internt")
    TextBox37 = rng(j, 1)
    rng = Range("MDeltagelse_netværk__eksternt")
    TextBox40 = rng(j, 1)
    rng = Range("MMandater_værdi")
    TextBox43 = rng(j, 1)
    rng = Range("MPipeline_værdi")
    TextBox46 = rng(j, 1)
    rng = Range("MKrydssalg_Deloitte")
    TextBox49 = rng(j, 1)
    rng = Range("MKrydssalg_FAS")
    TextBox52 = rng(j, 1)
    rng = Range("MKundetilfredshed")
    TextBox82 = rng(j, 1)
    
    
    'Månedsmål
    rng = Range("RMøder_kunder__I")
    TextBox181 = rng(j, 1)
    rng = Range("RMøder_kunder__P_E")
    TextBox182 = rng(j, 1)
    rng = Range("RMøder_emner__I")
    TextBox183 = rng(j, 1)
    rng = Range("RMøder_emner__P_E")
    TextBox184 = rng(j, 1)
    rng = Range("RLeads_Deloitte")
    TextBox185 = rng(j, 1)
    rng = Range("RLeads_FAS")
    TextBox189 = rng(j, 1)
    rng = Range("RVærdi_af_leads_Deloitte")
    TextBox191 = rng(j, 1)
    rng = Range("RVærdi_af_leads_FAS")
    TextBox190 = rng(j, 1)
    rng = Range("RRealiseret_leads_Deloitte")
    TextBox192 = rng(j, 1)
    rng = Range("RRealiseret_leads_FAS")
    TextBox193 = rng(j, 1)
    rng = Range("RDeltagelse_netværk__internt")
    TextBox186 = rng(j, 1)
    rng = Range("RDeltagelse_netværk__eksternt")
    TextBox187 = rng(j, 1)
    rng = Range("RMandater_værdi")
    TextBox188 = rng(j, 1)
    rng = Range("RPipeline_værdi")
    TextBox195 = rng(j, 1)
    rng = Range("RKrydssalg_Deloitte")
    TextBox196 = rng(j, 1)
    rng = Range("RKrydssalg_FAS")
    TextBox197 = rng(j, 1)
    rng = Range("RKundetilfredshed")
    TextBox198 = rng(j, 1)
    
    'Diverse-felter marked
    rng = Range("NMarDiverse1")
    TextBox137 = rng(j, 1)
    rng = Range("NMarDiverse2")
    TextBox140 = rng(j, 1)
    rng = Range("NMarDiverse3")
    TextBox136 = rng(j, 1)
    rng = Range("MMarDiverse1")
    TextBox138 = rng(j, 1)
    rng = Range("MMarDiverse2")
    TextBox141 = rng(j, 1)
    rng = Range("MMarDiverse3")
    TextBox143 = rng(j, 1)
    rng = Range("VMarDiverse1")
    TextBox139 = rng(j, 1)
    rng = Range("VMarDiverse2")
    TextBox142 = rng(j, 1)
    rng = Range("VMarDiverse3")
    TextBox144 = rng(j, 1)
    rng = Range("RMarDiverse1")
    TextBox199 = rng(j, 1)
    rng = Range("RMarDiverse2")
    TextBox200 = rng(j, 1)
    rng = Range("RMarDiverse3")
    TextBox194 = rng(j, 1)
    
    
    
    'Vægt
    rng = Range("VProduktion")
    TextBox21 = rng(j, 1)
    rng = Range("VMøder_kunder__I")
    TextBox24 = rng(j, 1)
    rng = Range("VMøder_kunder__P_E")
    TextBox27 = rng(j, 1)
    rng = Range("VMøder_emner__I")
    TextBox30 = rng(j, 1)
    rng = Range("VMøder_emner__P_E")
    TextBox33 = rng(j, 1)
    rng = Range("VLeads_Deloitte")
    TextBox36 = rng(j, 1)
    rng = Range("VLeads_FAS")
    TextBox94 = rng(j, 1)
    rng = Range("VVærdi_af_leads_Deloitte")
    TextBox97 = rng(j, 1)
    rng = Range("VVærdi_af_leads_FAS")
    TextBox100 = rng(j, 1)
    rng = Range("VRealiseret_leads_Deloitte")
    TextBox124 = rng(j, 1)
    rng = Range("VRealiseret_leads_FAS")
    TextBox126 = rng(j, 1)
    rng = Range("VDeltagelse_netværk__internt")
    TextBox39 = rng(j, 1)
    rng = Range("VDeltagelse_netværk__eksternt")
    TextBox42 = rng(j, 1)
    rng = Range("VMandater_værdi")
    TextBox45 = rng(j, 1)
    rng = Range("VPipeline_værdi")
    TextBox48 = rng(j, 1)
    rng = Range("VKrydssalg_Deloitte")
    TextBox51 = rng(j, 1)
    rng = Range("VKrydssalg_FAS")
    TextBox54 = rng(j, 1)
    rng = Range("VKundetilfredshed")
    TextBox84 = rng(j, 1)
    
    'Ledelse
    'Mål
    rng = Range("MJobvurderinger")
    TextBox55 = rng(j, 1)
    rng = Range("MPM_samtale")
    TextBox58 = rng(j, 1)
    rng = Range("MRetention_rate")
    TextBox61 = rng(j, 1)
    rng = Range("MÉn_til_én_samtaler")
    TextBox64 = rng(j, 1)
    rng = Range("MKlimamåling")
    TextBox67 = rng(j, 1)
    rng = Range("MMålopfyldelse_for_salgsteam")
    TextBox114 = rng(j, 1)
    rng = Range("MRating_fra_360_graders_review")
    TextBox117 = rng(j, 1)
    rng = Range("MRating_fra_kundeundersøgelser__samlet_team_rating")
    TextBox120 = rng(j, 1)
    
    'Månedsmål
    rng = Range("RJobvurderinger")
    TextBox208 = rng(j, 1)
    rng = Range("RPM_samtale")
    TextBox209 = rng(j, 1)
    rng = Range("RRetention_rate")
    TextBox210 = rng(j, 1)
    rng = Range("RÉn_til_én_samtaler")
    TextBox211 = rng(j, 1)
    rng = Range("RKlimamåling")
    TextBox212 = rng(j, 1)
    rng = Range("RMålopfyldelse_for_salgsteam")
    TextBox213 = rng(j, 1)
    rng = Range("RRating_fra_360_graders_review")
    TextBox214 = rng(j, 1)
    rng = Range("RRating_fra_kundeundersøgelser__samlet_team_rating")
    TextBox215 = rng(j, 1)
    'Diverse-felter ledelse
    rng = Range("NLedDiverse1")
    TextBox155 = rng(j, 1)
    rng = Range("NLedDiverse2")
    TextBox158 = rng(j, 1)
    rng = Range("NLedDiverse3")
    TextBox154 = rng(j, 1)
    rng = Range("MLedDiverse1")
    TextBox156 = rng(j, 1)
    rng = Range("MLedDiverse2")
    TextBox159 = rng(j, 1)
    rng = Range("MLedDiverse3")
    TextBox161 = rng(j, 1)
    rng = Range("VLedDiverse1")
    TextBox157 = rng(j, 1)
    rng = Range("VLedDiverse2")
    TextBox160 = rng(j, 1)
    rng = Range("VLedDiverse3")
    TextBox162 = rng(j, 1)
    rng = Range("RLedDiverse1")
    TextBox216 = rng(j, 1)
    rng = Range("RLedDiverse2")
    TextBox217 = rng(j, 1)
    rng = Range("RLedDiverse3")
    TextBox218 = rng(j, 1)
    
    
    'Vægte
    rng = Range("VJobvurderinger")
    TextBox57 = rng(j, 1)
    rng = Range("VPM_samtale")
    TextBox60 = rng(j, 1)
    rng = Range("VRetention_rate")
    TextBox63 = rng(j, 1)
    rng = Range("VÉn_til_én_samtaler")
    TextBox66 = rng(j, 1)
    rng = Range("VKlimamåling")
    TextBox69 = rng(j, 1)
    rng = Range("VMålopfyldelse_for_salgsteam")
    TextBox116 = rng(j, 1)
    rng = Range("VRating_fra_360_graders_review")
    TextBox119 = rng(j, 1)
    rng = Range("VRating_fra_kundeundersøgelser__samlet_team_rating")
    TextBox122 = rng(j, 1)
    
    'Økonomi
    'Mål
    rng = Range("MOmsætning")
    TextBox70 = rng(j, 1)
    rng = Range("MDBIII")
    TextBox73 = rng(j, 1)
    rng = Range("MFakturering")
    TextBox76 = rng(j, 1)
    rng = Range("MDebitorstyring")
    TextBox79 = rng(j, 1)
    
    'Månedsmål
    rng = Range("ROmsætning")
    TextBox220 = rng(j, 1)
    rng = Range("RDBIII")
    TextBox221 = rng(j, 1)
    rng = Range("RFakturering")
    TextBox222 = rng(j, 1)
    rng = Range("RDebitorstyring")
    TextBox223 = rng(j, 1)
    
    'Diverse-felter ledelse
    rng = Range("NØkoDiverse1")
    TextBox164 = rng(j, 1)
    rng = Range("NØkoDiverse2")
    TextBox167 = rng(j, 1)
    rng = Range("NØkoDiverse3")
    TextBox163 = rng(j, 1)
    rng = Range("MØkoDiverse1")
    TextBox165 = rng(j, 1)
    rng = Range("MØkoDiverse2")
    TextBox168 = rng(j, 1)
    rng = Range("MØkoDiverse3")
    TextBox170 = rng(j, 1)
    rng = Range("VØkoDiverse1")
    TextBox166 = rng(j, 1)
    rng = Range("VØkoDiverse2")
    TextBox169 = rng(j, 1)
    rng = Range("VØkoDiverse3")
    TextBox171 = rng(j, 1)
    rng = Range("RØkoDiverse1")
    TextBox224 = rng(j, 1)
    rng = Range("RØkoDiverse2")
    TextBox225 = rng(j, 1)
    rng = Range("RØkoDiverse3")
    TextBox219 = rng(j, 1)
    
    'Vægte
    rng = Range("VOmsætning")
    TextBox72 = rng(j, 1)
    rng = Range("VDBIII")
    TextBox75 = rng(j, 1)
    rng = Range("VFakturering")
    TextBox78 = rng(j, 1)
    rng = Range("VDebitorstyring")
    TextBox81 = rng(j, 1)
        
    'Produktion
    'Mål
    rng = Range("MLevKunde")
    TextBox101 = rng(j, 1)
    rng = Range("MLevJob")
    TextBox104 = rng(j, 1)
    rng = Range("MLevPeriode")
    TextBox107 = rng(j, 1)
    
    'Månedsmål
    rng = Range("RProduktion")
    TextBox205 = rng(j, 1)
    rng = Range("RLevKunde")
    TextBox202 = rng(j, 1)
    rng = Range("RLevJob")
    TextBox203 = rng(j, 1)
    rng = Range("RLevPeriode")
    TextBox204 = rng(j, 1)
    
    'Diverse-felter ledelse
    rng = Range("NProDiverse1")
    TextBox146 = rng(j, 1)
    rng = Range("NProDiverse2")
    TextBox149 = rng(j, 1)
    rng = Range("NProDiverse3")
    TextBox145 = rng(j, 1)
    rng = Range("MProDiverse1")
    TextBox147 = rng(j, 1)
    rng = Range("MProDiverse2")
    TextBox150 = rng(j, 1)
    rng = Range("MProDiverse3")
    TextBox152 = rng(j, 1)
    rng = Range("VProDiverse1")
    TextBox148 = rng(j, 1)
    rng = Range("VProDiverse2")
    TextBox151 = rng(j, 1)
    rng = Range("VProDiverse3")
    TextBox153 = rng(j, 1)
    rng = Range("RProDiverse1")
    TextBox206 = rng(j, 1)
    rng = Range("RProDiverse2")
    TextBox207 = rng(j, 1)
    rng = Range("RProDiverse3")
    TextBox201 = rng(j, 1)
    'Vægte
    rng = Range("VLevKunde")
    TextBox103 = rng(j, 1)
    rng = Range("VLevJob")
    TextBox106 = rng(j, 1)
    rng = Range("VLevPeriode")
    TextBox109 = rng(j, 1)
    
    'Samlede vægte
    rng = Range("VAdministration")
    TextBox85 = rng(j, 1)
    rng = Range("VMarked")
    TextBox86 = rng(j, 1)
    rng = Range("VLedelse")
    TextBox87 = rng(j, 1)
    rng = Range("VØkonomi")
    TextBox88 = rng(j, 1)
    rng = Range("VægtProduktion")
    TextBox110 = rng(j, 1)
    
    'Samlede vurderinger
    Dim Array_Procent As Variant 'Procent drop-down list
    Array_Procent = Sheets("lister").Range("Vurdering")
    ComboBox1.List() = Array_Procent
    ComboBox2.List() = Array_Procent
    ComboBox3.List() = Array_Procent
    ComboBox4.List() = Array_Procent
    ComboBox5.List() = Array_Procent
    
    rng = Range("RAdministration")
    ComboBox1 = rng(j, 1)
    rng = Range("RMarked")
    ComboBox2 = rng(j, 1)
    rng = Range("RLedelse")
    ComboBox4 = rng(j, 1)
    rng = Range("RØkonomi")
    ComboBox5 = rng(j, 1)
    rng = Range("RProduktionSamlet")
    ComboBox3 = rng(j, 1)
    
End Sub
Private Sub UserForm_Terminate()
    Entry = 1000
End Sub

The error occurs only sometimes for some users of the file. I have already checked that Excel/VBA settings are similar for all users.

I hope that you can give me a hint on what to do.

/Nana
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try this (two lines switched position... you cannot expect to run the Main.Show after you actually killed the form itself and its code within with Unload Me... so Unload should always be the last thing to do), also, this will only work correctly if your userforms are set up as non-modal:
Code:
    Else
        Main.Show
        Unload Me
    End If
End Sub
or this (don't kill the form instance, just hide it instead):
Code:
    Else
        Me.Hide
        Main.Show
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top