use text box instead of list box in a userform

still learning

Well-known Member
Joined
Jan 15, 2010
Messages
784
Office Version
  1. 365
Platform
  1. Windows
Hi

I’m using a list box in a userform that has the Letters A to Z
When the user wants to look up a word, he/she clicks on the letter and the box closes and the cursor goes to that range
Example: if A is picked, the cursor goes to A_A
If B is picked, the cursor goes to B_B
VBA Code:
Private Sub CommandButton1_Click()
Sheets("Sheet1").Select
Select Case Me.ListBox1.Value
Case Is = "A": Application.Goto Reference:="A_A", Scroll:=True
Case Is = "B": Application.Goto Reference:="B_B", Scroll:=True

I am wondering if I could have a Text Box and the user would then just enter a letter.
If it can be done, what would the code be??

If I used something like this
VBA Code:
With TextBox1 ActiveSheet.Range("ae3").Value = .Text
End With

How would I have a macro run base on a cell entry if the text box puts the letter in a cell on the sheet



mike
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,693
Members
449,117
Latest member
Aaagu

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