listbox rowsource also page name from textbox

bilisim2010

New Member
Joined
Jan 17, 2025
Messages
6
Office Version
  1. 365
Platform
  1. Windows
hello, I want the listbox rowsource to take the page name from the textbox! the a2:e50 part will not change. can you please help me with this...
ListBox1.RowSource = "10001!a2:e50"
 

Attachments

  • Adsız999.png
    Adsız999.png
    19.6 KB · Views: 3

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Welcome to the forum! :)

VBA Code:
Listbox1.Rowsource = "'" & Textbox1048.value & "'!a2:E50"

should do it.
 
Upvote 0
Welcome to the forum! :)

VBA Code:
Listbox1.Rowsource = "'" & Textbox1048.value & "'!a2:E50"

should do it.
Private Sub UserForm_Initialize()
Dim i As Long, t1 As Double, t2 As Double, t3 As Double, t4 As Double, t5 As Double, t6 As Double
If TextBox1048.Value = "10001" Then

ListBox1.RowSource = "'" & TextBox1048.Value & "'!a2:E50"
ListBox1.ColumnCount = 18 ' lisbox'ta ki sütun sayısı
ListBox1.ColumnWidths = "50;290;50;50;0;0;50;50;50;50;50;50;50;50;50;50;50;50" 'lisbox'taki sütunların genişliği
ListBox1.ColumnHeads = True
Eğer Sonlandır

Unfortunately it didn't work again :( It opens the userform but no data is coming.
 
Upvote 0
When you first open the userform, the textbox will be blank. I assumed you were using something like the textbox_exit event.
 
Upvote 0
Userform'u ilk açtığınızda textbox boş olacaktır. textbox_exit event'i gibi bir şey kullandığınızı varsaydım.
Hayır, aynı sayfa adına sahip başka bir userform'dan textbox1048'e userform'a veri gönderiyorum. Dosyayı paylaşıyorum, lütfen bir göz atabilir misiniz?

 
Upvote 0
Userform'u ilk açtığınızda textbox boş olacaktır. textbox_exit event'i gibi bir şey kullandığınızı varsaydım.
Userform'da currentmovement yazan listbox'a çift tıklayarak, index'teki veriyi recorder userform'daki textbox1048'e gönderiyorum. Recorder userform'un textbox1048'deki verinin olduğu sayfayı başlatıp seçmesini ve veriyi çekmesini istiyorum.
 
Upvote 0

Forum statistics

Threads
1,225,616
Messages
6,186,016
Members
453,334
Latest member
Prakash Jha

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