VBA-activation of textbox problem

McKing

New Member
Joined
Apr 16, 2011
Messages
4
Hi everyone.
I created Userform, where I have 2 textboxes - to the 1st one words from sheet is downloaded, to the 2nd I would like to write down translation of the word from the 1st textbox. After 1st box is automatically filled, I cant write down anything to the 2nd. I've tried Textbox2.setfocus - it moved cursor the Textbox2, but I cant write anything. Could anyone help me?Thanks a lot
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
By "write" do you mean "type" or are you trying to set the value of the textbox using VBA?

Is the textbox enabled and not locked?
 
Upvote 0
Write means in this case type from keyboard to the textbox. I've checked that and the textbox is enabled
 
Upvote 0
Is there any code running when you're trying to type into textbox2?

What code do you have behind the userform?
 
Upvote 0
I typed whole the code directly into user form. Program should be used for vocabulary testing(Texbox1=English,TB2=Norwegian).Code is a bit longer nevertheless this is the code immediately before and after the crutial part:
Private Sub UserForm_Activate()
.......etc.
Textbox1 = Worksheets("List1").Cells(Tested_word_row, "A").Value
Me.Textbox2.SetFocus
'After this is timer - I have 10s to type sth. in Textbx2 and then evaluation
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
.......etc.
End Sub. Thanks a lot in advance.
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,693
Members
452,938
Latest member
babeneker

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