Thema Datum  Von Nutzer Rating
Antwort
26.06.2014 21:16:38 Alexander
NotSolved
27.06.2014 03:38:11 Gast55144
NotSolved
27.06.2014 09:34:04 Alexander
NotSolved
27.06.2014 13:00:07 Alexander
NotSolved
Rot ComboBox Werte zuweisen
30.06.2014 02:30:02 Alexander
NotSolved
30.06.2014 03:24:45 Gast14996
NotSolved
30.06.2014 15:51:34 Alexander
NotSolved
30.06.2014 19:08:08 Alexander
NotSolved

Ansicht des Beitrags:
Von:
Alexander
Datum:
30.06.2014 02:30:02
Views:
880
Rating: Antwort:
  Ja
Thema:
ComboBox Werte zuweisen

Hallo VBA-Spezis,

könnt ihr mir sagen, was ich hier flasch gemacht habe? Eine ComboBox in der Tabelle funktioniert damit, aber sobald ich eine ComboBox im UserForm erstelle, läuft das nicht mehr.Warum eigentlich?

 

 

Private Sub ComboBox1_Change()
If ComboBox1.ListIndex < 0 Then Exit Sub
  
  With ComboBox1
    Cells(65, "V").Value = .List(.ListIndex, pdvfmk)
    Cells(66, "V").Value = .List(.ListIndex, pdvfc0k)
    Cells(67, "V").Value = .List(.ListIndex, pdvE0Mean)
    Cells(68, "V").Value = .List(.ListIndex, pdvE005)
    Cells(69, "V").Value = .List(.ListIndex, pdvGMean)
    Cells(70, "V").Value = .List(.ListIndex, pdvG05)
    Cells(75, "V").Value = .List(.ListIndex, pdvkfi)
    Cells(51, "V").Value = .List(.ListIndex, pdvBetaN)
    Cells(92, "O").Value = .List(.ListIndex, pdvBetaC)
    
  End With
  
End Sub
 
Private Sub Init() 'Materialauswahl
   
  With ComboBox1
    
    .ColumnCount = 1
     
    .Clear
     
    .AddItem "NH C 24"
    .List(.ListCount - 1, pdvfmk) = "24"
    .List(.ListCount - 1, pdvfc0k) = "21"
    .List(.ListCount - 1, pdvE0Mean) = "11000"
    .List(.ListCount - 1, pdvE005) = "7333"
    .List(.ListCount - 1, pdvGMean) = "690"
    .List(.ListCount - 1, pdvG05) = "460"
    .List(.ListCount - 1, pdvkfi) = "1,25"
    .List(.ListCount - 1, pdvBetaN) = "0,8"
    .List(.ListCount - 1, pdvBetaC) = "0,2"
    
     
    .AddItem "NH C 30"
    .List(.ListCount - 1, pdvfmk) = "30"
    .List(.ListCount - 1, pdvfc0k) = "23"
    .List(.ListCount - 1, pdvE0Mean) = "12000"
    .List(.ListCount - 1, pdvE005) = "8000"
    .List(.ListCount - 1, pdvGMean) = "750"
    .List(.ListCount - 1, pdvG05) = "500"
    .List(.ListCount - 1, pdvkfi) = "1,25"
    .List(.ListCount - 1, pdvBetaC) = "0,2"
    
    
    .AddItem "BSH Gl24h"
    .List(.ListCount - 1, pdvfmk) = "24"
    .List(.ListCount - 1, pdvfc0k) = "24"
    .List(.ListCount - 1, pdvE0Mean) = "11600"
    .List(.ListCount - 1, pdvE005) = "9167"
    .List(.ListCount - 1, pdvGMean) = "720"
    .List(.ListCount - 1, pdvG05) = "600"
    .List(.ListCount - 1, pdvkfi) = "1,15"
    .List(.ListCount - 1, pdvBetaN) = "0,7"
    .List(.ListCount - 1, pdvBetaC) = "0.1"
        
 
    .AddItem "BSH Gl24c"
    .List(.ListCount - 1, pdvfmk) = "24"
    .List(.ListCount - 1, pdvfc0k) = "21"
    .List(.ListCount - 1, pdvE0Mean) = "11600"
    .List(.ListCount - 1, pdvE005) = "9167"
    .List(.ListCount - 1, pdvGMean) = "590"
    .List(.ListCount - 1, pdvG05) = "492"
    .List(.ListCount - 1, pdvkfi) = "1,15"
    .List(.ListCount - 1, pdvBetaN) = "0,7"
    .List(.ListCount - 1, pdvBetaC) = "0.1"
    
  End With
 
End Sub
 
 
Gruß Alexander
 

Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
26.06.2014 21:16:38 Alexander
NotSolved
27.06.2014 03:38:11 Gast55144
NotSolved
27.06.2014 09:34:04 Alexander
NotSolved
27.06.2014 13:00:07 Alexander
NotSolved
Rot ComboBox Werte zuweisen
30.06.2014 02:30:02 Alexander
NotSolved
30.06.2014 03:24:45 Gast14996
NotSolved
30.06.2014 15:51:34 Alexander
NotSolved
30.06.2014 19:08:08 Alexander
NotSolved