• Privacywetgeving
    Het is bij Helpmij.nl niet toegestaan om persoonsgegevens in een voorbeeld te plaatsen. Alle voorbeelden die persoonsgegevens bevatten zullen zonder opgaaf van reden verwijderd worden. In de vraag zal specifiek vermeld moeten worden dat het om fictieve namen gaat.

userform textboxen waarde halen van worksheet

Status
Niet open voor verdere reacties.

bjornesto

Gebruiker
Lid geworden
16 apr 2012
Berichten
201
Ik heb een userform met volgende code die werkt.
Echter denk ik dat dit eenvoudiger kan maar mijn zoektocht heeft nog niet veel opgebracht.

Kan iemand mij helpen?


Code:
TextBox1.Value = Cells(ActiveCell.Row, 12).Value
TextBox2.Value = Cells(ActiveCell.Row, 13).Value
TextBox3.Value = Cells(ActiveCell.Row, 14).Value
TextBox4.Value = Cells(ActiveCell.Row, 15).Value
TextBox5.Value = Cells(ActiveCell.Row, 16).Value
TextBox6.Value = Cells(ActiveCell.Row, 17).Value
TextBox7.Value = Cells(ActiveCell.Row, 18).Value
TextBox8.Value = Cells(ActiveCell.Row, 19).Value
TextBox9.Value = Cells(ActiveCell.Row, 20).Value
TextBox10.Value = Cells(ActiveCell.Row, 21).Value
TextBox11.Value = Cells(ActiveCell.Row, 22).Value
TextBox12.Value = Cells(ActiveCell.Row, 23).Value
TextBox13.Value = Cells(ActiveCell.Row, 24).Value
TextBox14.Value = Cells(ActiveCell.Row, 25).Value
TextBox15.Value = Cells(ActiveCell.Row, 26).Value
TextBox16.Value = Cells(ActiveCell.Row, 27).Value
TextBox17.Value = Cells(ActiveCell.Row, 28).Value
TextBox18.Value = Cells(ActiveCell.Row, 29).Value
TextBox19.Value = Cells(ActiveCell.Row, 30).Value
TextBox20.Value = Cells(ActiveCell.Row, 31).Value
TextBox21.Value = Cells(ActiveCell.Row, 32).Value
 
Code:
For i = 1 to 21
me("textbox" & i).value = cells(activecell.row, i+11).value
next
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan