Hey there,
i have a question.
i have a userform that contains all data from a company.
It gets the data from a heet called "companies".
The userform is opened by clicking a button on another userform("menu").
This far it works ok.
The problem is that i have more companies in that one sheet that i want to call from that one userform ( so when the button company2 on the menu is pressed it open's the data userform and displays the data from that company.
On the sheet "Companies" all the data for each company is in the same location except 50 rows lower.
I don't know how i can easily call those different rows.
I tried sopmething like:
in this i want to define T in every button click event
i.e.
If anyone can help me i would greatly appreciate it
Greetz,
Rutger
i have a question.
i have a userform that contains all data from a company.
It gets the data from a heet called "companies".
The userform is opened by clicking a button on another userform("menu").
This far it works ok.
The problem is that i have more companies in that one sheet that i want to call from that one userform ( so when the button company2 on the menu is pressed it open's the data userform and displays the data from that company.
On the sheet "Companies" all the data for each company is in the same location except 50 rows lower.
I don't know how i can easily call those different rows.
I tried sopmething like:
Code:
Public Sub UserForm_Activate()
Dim T As String
Label18.Caption = "U bent ingelogd als: " & Login!Name.Value
Label1.Caption = TextBox1.Value
Site!TextBox1.Value = [Sheets]![Sites].Cells(40 + T, 1).Value
Site!TextBox2.Value = [Sheets]![Sites].Cells(40 + T, 2).Value
Site!TextBox3.Value = [Sheets]![Sites].Cells(40 + T, 3).Value
Site!TextBox4.Value = [Sheets]![Sites].Cells(40 + T, 4).Value
in this i want to define T in every button click event
i.e.
Code:
Private Sub CommandButton17_Click()
Dim T As String
T = "50"
If anyone can help me i would greatly appreciate it
Greetz,
Rutger