Consulting

Results 1 to 2 of 2

Thread: VBA Macro

  1. #1
    VBAX Newbie
    Joined
    Dec 2018
    Posts
    2
    Location

    VBA Macro

    Hello,

    I have posted my code, which contains my macro. Now Im Looking for a code that allows to write numbers into the text boxes, which are then transfered to my Excel sheet. I have tried out several solutions, which hoewever did not work out. If someone could give me a start, I would appreciate it. Or a guideline. Thank you.


    Private Sub ComboBox1_Change()

    End Sub
    Private Sub ComboBox2_Change()
    End Sub
    Private Sub CommandButton1_Click()
    ActiveSheet.Cells(1, 1).Select = ComboBox1
    Unload Me
    UserForm2.Show

    End Sub
    Private Sub CommandButton2_Click()
    Unload Me
    End Sub
    Private Sub Label1_Click()
    End Sub
    Private Sub Label2_Click()
    End Sub
    Private Sub Label4_Click()
    End Sub
    Private Sub TextBox1_Change()


    End Sub
    Private Sub TextBox2_Change()
    End Sub
    Private Sub TextBox9_Change()
    End Sub
    Private Sub UserForm_Click()
    End Sub


    Private Sub UserForm_Initialize()



    ' Nutzung --> Drop Box 1: Auswahl Nutzung


    With UserForm1.ComboBox1

    .AddItem "Wohnen MFH"
    .AddItem "Wohnen EFH"
    .AddItem "Verwaltung"
    .AddItem "Schulen"
    .AddItem "Verkauf"
    .AddItem "Restaurants"
    .AddItem "Versammlungslokale"
    .AddItem "Spit?ler"
    .AddItem "Industrie"
    .AddItem "Lager"
    .AddItem "Sportbauten"
    .AddItem "Hallenb?der"
    End With


    ' Nutzung --> Drop Box 2: Auswahl W?rmeerzeuger

    With UserForm1.ComboBox2
    .AddItem "W?rmepumpe"
    .AddItem "Pelletsheizung"
    .AddItem "St?ckholzheizung"
    .AddItem "Holzschnitzelheizung (trocken)"
    .AddItem "Holzschnitzelheizung (frisch)"
    .AddItem "?lheizung"
    .AddItem "Gasheizung (Erdgas)"
    .AddItem "Gasheizung (Biogas)"

    End With
    End Sub

  2. #2
    VBAX Mentor
    Joined
    Apr 2009
    Location
    Kingsbury
    Posts
    384
    Location
    Please use hash tags to post code it makes it easier for people to understand
    Also a copy of the workbook would be nice ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •