Excel vba textbox setfocus not working

Next, you can drag a text box on the Userform. When you arrive at the Car frame, remember to draw this frame first before you place the two option buttons in it. 4. Change the names and captions of the controls according to the table below. Names are used in the Excel VBA code. Captions are those that appear on your screen.

Distribution in kind private equity

Constructeurs normands avis

  • My problem lies in that after i scan a SKU Barcode, focus does not return to text label (T4) in order to keep scanning (SKU TEXT LABEL = T4), unless i hit TAB once. I need this to be automatic, and setfocus property is not working. Here's my code:
  • My problem lies in that after i scan a SKU Barcode, focus does not return to text label (T4) in order to keep scanning (SKU TEXT LABEL = T4), unless i hit TAB once. I need this to be automatic, and setfocus property is not working. Here's my code:
  • Re: SetFocus doesn't work on modeless dialog (not an acFocus issue) It actually is first (set to 0). The funny part is that the first time tab is pressed, the second textbox becomes active, even though the first one was never active.
  • SetFocus. expression A variable that represents a TextBox object. Return value. Nothing. Remarks. You can use the SetFocus method when you want a particular field or control to have the focus so that all user input is directed to this object. To read some of the properties of a control, you need to ensure that the control has the focus.
  • Learn how to build 10 Excel VBA applications from scratch.) ... but this is also not working. Best regards, ... – set focus to the textbox with tabindex 6 ...
  • VBA UserForm – How to automatically switch to next Textbox. The code-snippet presented in this very first post on my blog is helpful when the user has to enter data in TextBoxes in a UserForm, using VBA for Excel. What we want to achieve is that whenever the user has entered 6 characters in TextBox1, then TextBox2 is selected by default. That ...
  • VBA TextBox Control on the UserForm . Please find more details about VBA ActiveX TextBox Control on the UserForm. Go To Developer Tab and then click Visual Basic from the Code or Press Alt+F11. Go To Insert Menu, Click UserForm. Please find the screenshot for the same. Drag the TextBox control on the Userform from the Toolbox. Hi, I would like to validate userform textbox entry for numbers only. I have code that works great for alphabet (letter) entry. If other than a letter is entered the textbox turns red, and at close of messagebox textbox returns to white and cursor is positioned left. I would like to adapt this same method for number entry only. However, I can't...

VBA TextBox Control on the UserForm . Please find more details about VBA ActiveX TextBox Control on the UserForm. Go To Developer Tab and then click Visual Basic from the Code or Press Alt+F11. Go To Insert Menu, Click UserForm. Please find the screenshot for the same. Drag the TextBox control on the Userform from the Toolbox. Dec 23, 2013 · Hi, Maneesh Massey! The exit event of a text box control is triggered when it loses the focus (i.e., as LostFocus in Visual Basic). So instead of setting again the focus by the SetFocus method that's only available in VBA for windows objects and not for controls, set the Cancel value to true and the control will retain the focus. Dec 23, 2013 · Hi, Maneesh Massey! The exit event of a text box control is triggered when it loses the focus (i.e., as LostFocus in Visual Basic). So instead of setting again the focus by the SetFocus method that's only available in VBA for windows objects and not for controls, set the Cancel value to true and the control will retain the focus.

So context: I have a vba that opens a selected pdf, copies the text, pasted it into excel and through formulas in the workbook, deciphers the important information. As far as I can tell, everything is working as it should be. The only issue is, I would like some system to verify that the results of the workbook match up with the info on the pdf.

I'm using the BeforeUpdate event for the text box with the following code that is executed if the input is not within the parameters: txtInputBox.SetFocus where txtInputBox is the name of the text box. I've also tried using me.txtInputBox.SetFocus but that doesn't seem to work either. The following code did not work. After data was entered, textbox2 would always get focus. Private Sub Textbox1_AfterUpdate() debug.print textbox1.text ' actual processing program is irrelevant to today's post TextBox1.text = "" textbox1.setfocus End Sub The following code DID work fairly well. VBA TextBox Control on the UserForm . Please find more details about VBA ActiveX TextBox Control on the UserForm. Go To Developer Tab and then click Visual Basic from the Code or Press Alt+F11. Go To Insert Menu, Click UserForm. Please find the screenshot for the same. Drag the TextBox control on the Userform from the Toolbox.

Sep 20, 2016 · Textbox Set Cursor Focus and Enter Key Handling in c# ... Textbox Events to Run Subroutines with Excel VBA (Change, Enter ... Set Focus on Specific Control on User Form Using Excel VBA ... My problem lies in that after i scan a SKU Barcode, focus does not return to text label (T4) in order to keep scanning (SKU TEXT LABEL = T4), unless i hit TAB once. I need this to be automatic, and setfocus property is not working. Here's my code: SetFocus. expression A variable that represents a TextBox object. Return value. Nothing. Remarks. You can use the SetFocus method when you want a particular field or control to have the focus so that all user input is directed to this object. To read some of the properties of a control, you need to ensure that the control has the focus.

Dec 23, 2013 · Hi, Maneesh Massey! The exit event of a text box control is triggered when it loses the focus (i.e., as LostFocus in Visual Basic). So instead of setting again the focus by the SetFocus method that's only available in VBA for windows objects and not for controls, set the Cancel value to true and the control will retain the focus. My only background in programming is Excel VBA (but i tried to learn the basics of SQL, Python and Java) but after 2 years working as a Dev, I managed to learn about web development languages (HTML, CSS, Javascript and Jquery). .

So in the VBA Project / Forms / frm_sale / OK Click event - near the bottom I added a set focus before the 'frm_sale.hide' - This removed the focus from the 'OK' box - but the cursor is still not in the text box, and it needs to be clicked in order to enter text. So context: I have a vba that opens a selected pdf, copies the text, pasted it into excel and through formulas in the workbook, deciphers the important information. As far as I can tell, everything is working as it should be. The only issue is, I would like some system to verify that the results of the workbook match up with the info on the pdf. Dec 23, 2013 · Hi, Maneesh Massey! The exit event of a text box control is triggered when it loses the focus (i.e., as LostFocus in Visual Basic). So instead of setting again the focus by the SetFocus method that's only available in VBA for windows objects and not for controls, set the Cancel value to true and the control will retain the focus.

Hi, can anyone tell me how should i setfocus on a textbox immediately after the form loads? i have put textbox1.focus() (Vb.net)but it wont work. I put this code under form_load but the textbox is visible.! So in the VBA Project / Forms / frm_sale / OK Click event - near the bottom I added a set focus before the 'frm_sale.hide' - This removed the focus from the 'OK' box - but the cursor is still not in the text box, and it needs to be clicked in order to enter text. So context: I have a vba that opens a selected pdf, copies the text, pasted it into excel and through formulas in the workbook, deciphers the important information. As far as I can tell, everything is working as it should be. The only issue is, I would like some system to verify that the results of the workbook match up with the info on the pdf. In Excel 97 I have a UserForm with a text box that has VBA code in the '__BeforeUpdate()' event. The form also has a command button. It appears that if the user types stuff in the textbox, then immediately mouse-clicks the command button, the _beforeUpdate() event of the text box is not triggered.

At this point the user will be able to type in the textbox and delete text normally, and they will be allowed to click inside the textbox because the image control will no longer cover the textbox. Then, as soon as the user moves the keyboard focus to another control, the textbox's Exit event handler will show the image control again so the ... SetFocus. expression A variable that represents a TextBox object. Return value. Nothing. Remarks. You can use the SetFocus method when you want a particular field or control to have the focus so that all user input is directed to this object. To read some of the properties of a control, you need to ensure that the control has the focus.

The following code did not work. After data was entered, textbox2 would always get focus. Private Sub Textbox1_AfterUpdate() debug.print textbox1.text ' actual processing program is irrelevant to today's post TextBox1.text = "" textbox1.setfocus End Sub The following code DID work fairly well.

Next, you can drag a text box on the Userform. When you arrive at the Car frame, remember to draw this frame first before you place the two option buttons in it. 4. Change the names and captions of the controls according to the table below. Names are used in the Excel VBA code. Captions are those that appear on your screen. My problem lies in that after i scan a SKU Barcode, focus does not return to text label (T4) in order to keep scanning (SKU TEXT LABEL = T4), unless i hit TAB once. I need this to be automatic, and setfocus property is not working. Here's my code:

Using Excel VBA fix the problem of a Userform Textbox scrolling to the bottom when you click into it. Also fixes the problem of scrollbar not showing. So context: I have a vba that opens a selected pdf, copies the text, pasted it into excel and through formulas in the workbook, deciphers the important information. As far as I can tell, everything is working as it should be. The only issue is, I would like some system to verify that the results of the workbook match up with the info on the pdf.

vba,excel-vba Having a little trouble with my userform, its not unloading once i hit the command button the data is inputted to the sheet but the userform is not refreshed and the data stays in the text boxes. It was working fine until i put the data validation in, but i... My only background in programming is Excel VBA (but i tried to learn the basics of SQL, Python and Java) but after 2 years working as a Dev, I managed to learn about web development languages (HTML, CSS, Javascript and Jquery).

For example, you might have a information only form that you want to display, but leave focus on the worksheet so that when the user starts to type, the input goes to the worksheet not the form. You can accomplish this with a few simple Windows API calls. This technique will work only on user forms that are shown modelessly (e.g,. Learn how to build 10 Excel VBA applications from scratch.) ... but this is also not working. Best regards, ... – set focus to the textbox with tabindex 6 ... I'm trying to accomplish what Rebekah tried. Unfortunately it's not really working for me. I have a cuople of combo boxes but i want to ensure that all of the field have a value ie not null. I've tried long and hard to find the 'required' property in the property window for each but i don't see anything that i can click to either say yes or no. VBA TextBox Control on the UserForm . Please find more details about VBA ActiveX TextBox Control on the UserForm. Go To Developer Tab and then click Visual Basic from the Code or Press Alt+F11. Go To Insert Menu, Click UserForm. Please find the screenshot for the same. Drag the TextBox control on the Userform from the Toolbox.

Mysql username wordlist

Realsense point cloud python

  • Dec 23, 2013 · Hi, Maneesh Massey! The exit event of a text box control is triggered when it loses the focus (i.e., as LostFocus in Visual Basic). So instead of setting again the focus by the SetFocus method that's only available in VBA for windows objects and not for controls, set the Cancel value to true and the control will retain the focus. Nov 14, 2018 · The user can select text in a TextBox and tab to other controls on a form, as well as transfer the focus to a second form. This code sample also uses the SetFocus method, and the EnterFieldBehavior, MultiLine, and Value properties. To use this example, follow these steps:
  • [Solved] SetFocus command being ignored Word VBA. I'm not sure why the Change is not working but it only appears to fail if you tab out of the FirearmTypeComboBox - clicking to other boxes is fine. Jan 23, 2015 · I have a userform that after update on Textbox1 code, checks if less than 8 characters and returns msgbox, clears textbox1 and I need it to go back to textbox 1 but continues on to textbox2 no matter what. Learn how to build 10 Excel VBA applications from scratch.) ... but this is also not working. Best regards, ... – set focus to the textbox with tabindex 6 ...
  • SetFocus. expression A variable that represents a TextBox object. Return value. Nothing. Remarks. You can use the SetFocus method when you want a particular field or control to have the focus so that all user input is directed to this object. To read some of the properties of a control, you need to ensure that the control has the focus. Jan 21, 2014 · as a side note; in the real world I found that the human might enter/tab before any scanned value was there - expect the unexpected; so I guess the beforeupdate event is not triggered in that case because then the cursor/tab would advance - once that was experienced and understood - I put code in the OnExit to set focus on the control just ... Feb 05, 2014 · "set focus" is mainly used in USERFORM to move cursor to the next Textbox, combobox or area of choice. For example if you have validation Textbox for a phone number and you want the cursor to automatically switch to the next after the user type in 10 digits.
  • The following code did not work. After data was entered, textbox2 would always get focus. Private Sub Textbox1_AfterUpdate() debug.print textbox1.text ' actual processing program is irrelevant to today's post TextBox1.text = "" textbox1.setfocus End Sub The following code DID work fairly well. .
  • Could Not Load An Object Because It Is Not Available On This Machine - Excel Thought I'd append my experience of the above problem - you can find all sorts of references to it everywhere. My problem was that a userform defined with Excel at work (containing DT pickers) gave the message in the title when opening it at home. Using Excel VBA fix the problem of a Userform Textbox scrolling to the bottom when you click into it. Also fixes the problem of scrollbar not showing. Hi, I would like to validate userform textbox entry for numbers only. I have code that works great for alphabet (letter) entry. If other than a letter is entered the textbox turns red, and at close of messagebox textbox returns to white and cursor is positioned left. I would like to adapt this same method for number entry only. However, I can't... 231 graphic equalizer settings
  • Next, you can drag a text box on the Userform. When you arrive at the Car frame, remember to draw this frame first before you place the two option buttons in it. 4. Change the names and captions of the controls according to the table below. Names are used in the Excel VBA code. Captions are those that appear on your screen. Jun 08, 2007 · This is for a VBA TextBox (Not Worksheet). I have two text boxes, both are going to have dates. Textbox1 a user will enter a date; example 10/22/08 or 10-22-08 or 10-22-2008 etc, TextBox2 will get that date and add seven days. View 3 Replies View Related Set Focus Not Working On TextBox After After Update Mar 30, 2014. I am creating an Add ... Learn how to build 10 Excel VBA applications from scratch.) ... but this is also not working. Best regards, ... – set focus to the textbox with tabindex 6 ...
  • Re: SetFocus doesn't work on modeless dialog (not an acFocus issue) It actually is first (set to 0). The funny part is that the first time tab is pressed, the second textbox becomes active, even though the first one was never active. . 

Muhurat movie 2020

My problem lies in that after i scan a SKU Barcode, focus does not return to text label (T4) in order to keep scanning (SKU TEXT LABEL = T4), unless i hit TAB once. I need this to be automatic, and setfocus property is not working. Here's my code: Please help: I am having trouble with the setfocus command and I have done a bit of searching but my knowledge of vba is very little. I have managed to get the following code with help but the setfocus in the Private Sub DateTextBox_AfterUpdate() is not working. My only background in programming is Excel VBA (but i tried to learn the basics of SQL, Python and Java) but after 2 years working as a Dev, I managed to learn about web development languages (HTML, CSS, Javascript and Jquery).

VBA TextBox Control on the UserForm . Please find more details about VBA ActiveX TextBox Control on the UserForm. Go To Developer Tab and then click Visual Basic from the Code or Press Alt+F11. Go To Insert Menu, Click UserForm. Please find the screenshot for the same. Drag the TextBox control on the Userform from the Toolbox. Learn how to build 10 Excel VBA applications from scratch.) ... but this is also not working. Best regards, ... – set focus to the textbox with tabindex 6 ...

Write a program in javascript to find reverse of a number

Feb 05, 2014 · "set focus" is mainly used in USERFORM to move cursor to the next Textbox, combobox or area of choice. For example if you have validation Textbox for a phone number and you want the cursor to automatically switch to the next after the user type in 10 digits. [Solved] SetFocus command being ignored Word VBA. I'm not sure why the Change is not working but it only appears to fail if you tab out of the FirearmTypeComboBox - clicking to other boxes is fine. Jan 21, 2014 · as a side note; in the real world I found that the human might enter/tab before any scanned value was there - expect the unexpected; so I guess the beforeupdate event is not triggered in that case because then the cursor/tab would advance - once that was experienced and understood - I put code in the OnExit to set focus on the control just ...

VBA UserForm – How to automatically switch to next Textbox. The code-snippet presented in this very first post on my blog is helpful when the user has to enter data in TextBoxes in a UserForm, using VBA for Excel. What we want to achieve is that whenever the user has entered 6 characters in TextBox1, then TextBox2 is selected by default. That ... Please help: I am having trouble with the setfocus command and I have done a bit of searching but my knowledge of vba is very little. I have managed to get the following code with help but the setfocus in the Private Sub DateTextBox_AfterUpdate() is not working. I'm trying to accomplish what Rebekah tried. Unfortunately it's not really working for me. I have a cuople of combo boxes but i want to ensure that all of the field have a value ie not null. I've tried long and hard to find the 'required' property in the property window for each but i don't see anything that i can click to either say yes or no.

I have a textbox on a userform which has the following trigger : Private Sub txtLotId_AfterUpdate() Lot_Id = frmMainForm.txtLotId.Text If Lot_Id Then SQLStmt = Cannot set focus on a Textbox Word VBA - VBA Visual Basic for Applications (Microsoft) - Tek-Tips Jan 21, 2014 · as a side note; in the real world I found that the human might enter/tab before any scanned value was there - expect the unexpected; so I guess the beforeupdate event is not triggered in that case because then the cursor/tab would advance - once that was experienced and understood - I put code in the OnExit to set focus on the control just ...

[Solved] SetFocus command being ignored Word VBA. I'm not sure why the Change is not working but it only appears to fail if you tab out of the FirearmTypeComboBox - clicking to other boxes is fine.

Goodyear wrangler ultraterrain at sizes

  • Benzedrex withdrawal
  • Tener malas pulgas meaning
  • Desktop hero free

My only background in programming is Excel VBA (but i tried to learn the basics of SQL, Python and Java) but after 2 years working as a Dev, I managed to learn about web development languages (HTML, CSS, Javascript and Jquery).

So context: I have a vba that opens a selected pdf, copies the text, pasted it into excel and through formulas in the workbook, deciphers the important information. As far as I can tell, everything is working as it should be. The only issue is, I would like some system to verify that the results of the workbook match up with the info on the pdf.

Mar 16, 2003 · I'm not a VB/VBA pro, but I think I understand all the concepts involved, and am _really_ confused that MS's own example doesn't even work! I've also noticed that a TabIndex property is not listed for the textbox control, which isn't directly related, but also confuses me. Please help: I am having trouble with the setfocus command and I have done a bit of searching but my knowledge of vba is very little. I have managed to get the following code with help but the setfocus in the Private Sub DateTextBox_AfterUpdate() is not working. Tech support scams are an industry-wide issue where scammers trick you into paying for unnecessary technical support services. You can help protect yourself from scammers by verifying that the contact is a Microsoft Agent or Microsoft Employee and that the phone number is an official Microsoft global customer service number.

.

Mar 16, 2003 · I'm not a VB/VBA pro, but I think I understand all the concepts involved, and am _really_ confused that MS's own example doesn't even work! I've also noticed that a TabIndex property is not listed for the textbox control, which isn't directly related, but also confuses me. Re: SetFocus doesn't work on modeless dialog (not an acFocus issue) It actually is first (set to 0). The funny part is that the first time tab is pressed, the second textbox becomes active, even though the first one was never active.

My problem lies in that after i scan a SKU Barcode, focus does not return to text label (T4) in order to keep scanning (SKU TEXT LABEL = T4), unless i hit TAB once. I need this to be automatic, and setfocus property is not working. Here's my code:

  • Hi, I would like to validate userform textbox entry for numbers only. I have code that works great for alphabet (letter) entry. If other than a letter is entered the textbox turns red, and at close of messagebox textbox returns to white and cursor is positioned left. I would like to adapt this same method for number entry only. However, I can't...
  • The following code did not work. After data was entered, textbox2 would always get focus. Private Sub Textbox1_AfterUpdate() debug.print textbox1.text ' actual processing program is irrelevant to today's post TextBox1.text = "" textbox1.setfocus End Sub The following code DID work fairly well. In Excel 97 I have a UserForm with a text box that has VBA code in the '__BeforeUpdate()' event. The form also has a command button. It appears that if the user types stuff in the textbox, then immediately mouse-clicks the command button, the _beforeUpdate() event of the text box is not triggered.
  • My problem lies in that after i scan a SKU Barcode, focus does not return to text label (T4) in order to keep scanning (SKU TEXT LABEL = T4), unless i hit TAB once. I need this to be automatic, and setfocus property is not working. Here's my code: May 09, 2009 · SetFocus On TextBox As First Control In A Frame May 9, 2005. In Excel 2000 there seems to be a problem with setting the focus in a UserForm TextBox if the SetFocus method is applied in the same submodule as the UserForm.Show method. Microsoft's circumvention for this is to put the SetFocus command in the form's Activate event submodule.
  • Dec 23, 2013 · Hi, Maneesh Massey! The exit event of a text box control is triggered when it loses the focus (i.e., as LostFocus in Visual Basic). So instead of setting again the focus by the SetFocus method that's only available in VBA for windows objects and not for controls, set the Cancel value to true and the control will retain the focus.
  • Tech support scams are an industry-wide issue where scammers trick you into paying for unnecessary technical support services. You can help protect yourself from scammers by verifying that the contact is a Microsoft Agent or Microsoft Employee and that the phone number is an official Microsoft global customer service number. The following code did not work. After data was entered, textbox2 would always get focus. Private Sub Textbox1_AfterUpdate() debug.print textbox1.text ' actual processing program is irrelevant to today's post TextBox1.text = "" textbox1.setfocus End Sub The following code DID work fairly well.

Tech support scams are an industry-wide issue where scammers trick you into paying for unnecessary technical support services. You can help protect yourself from scammers by verifying that the contact is a Microsoft Agent or Microsoft Employee and that the phone number is an official Microsoft global customer service number. Hi, I would like to validate userform textbox entry for numbers only. I have code that works great for alphabet (letter) entry. If other than a letter is entered the textbox turns red, and at close of messagebox textbox returns to white and cursor is positioned left. I would like to adapt this same method for number entry only. However, I can't... .

For example, you might have a information only form that you want to display, but leave focus on the worksheet so that when the user starts to type, the input goes to the worksheet not the form. You can accomplish this with a few simple Windows API calls. This technique will work only on user forms that are shown modelessly (e.g,. Could Not Load An Object Because It Is Not Available On This Machine - Excel Thought I'd append my experience of the above problem - you can find all sorts of references to it everywhere. My problem was that a userform defined with Excel at work (containing DT pickers) gave the message in the title when opening it at home.

|

Dsc bump

Jan 21, 2014 · as a side note; in the real world I found that the human might enter/tab before any scanned value was there - expect the unexpected; so I guess the beforeupdate event is not triggered in that case because then the cursor/tab would advance - once that was experienced and understood - I put code in the OnExit to set focus on the control just ... Sep 24, 2014 · Aprenda usar SetFocus. Saiba para que serve

Re: Can't use SetFocus with TextBox in Excel VBA Originally Posted by westconn1 you can not take the focus away from the textbox unless there is someother control on the userform to get focus, if you are finished with the userform unload me (or unload userform1) to close it Learn how to build 10 Excel VBA applications from scratch.) ... but this is also not working. Best regards, ... – set focus to the textbox with tabindex 6 ... VBA UserForm – How to automatically switch to next Textbox. The code-snippet presented in this very first post on my blog is helpful when the user has to enter data in TextBoxes in a UserForm, using VBA for Excel. What we want to achieve is that whenever the user has entered 6 characters in TextBox1, then TextBox2 is selected by default. That ... The following code did not work. After data was entered, textbox2 would always get focus. Private Sub Textbox1_AfterUpdate() debug.print textbox1.text ' actual processing program is irrelevant to today's post TextBox1.text = "" textbox1.setfocus End Sub The following code DID work fairly well. At this point the user will be able to type in the textbox and delete text normally, and they will be allowed to click inside the textbox because the image control will no longer cover the textbox. Then, as soon as the user moves the keyboard focus to another control, the textbox's Exit event handler will show the image control again so the ...

Dodge transmission identification

Bt05 bluetooth module arduino

Tf2 stock market

Bernd storck olympiakos
Hmm, I see no explicit reason why it shouldn't work. I think it may lie with the properties of the textbox you're trying to set focus to. Check the locked and enabled properties tanker_txtbx. I don't remember which one but if one of them is set incorrectly, then you can't set focus to that control.
Pirelli tire warranty customer service
4x4 posts for shed

Google movies harry potter
Cleaning headlight lenses with wd40

Best vitamins for hormonal acne
Revealbot

Compressor tonnage calculation

16 bit depth

Bliss spa uk

Could Not Load An Object Because It Is Not Available On This Machine - Excel Thought I'd append my experience of the above problem - you can find all sorts of references to it everywhere. My problem was that a userform defined with Excel at work (containing DT pickers) gave the message in the title when opening it at home. [Solved] SetFocus command being ignored Word VBA. I'm not sure why the Change is not working but it only appears to fail if you tab out of the FirearmTypeComboBox - clicking to other boxes is fine. Jun 08, 2007 · This is for a VBA TextBox (Not Worksheet). I have two text boxes, both are going to have dates. Textbox1 a user will enter a date; example 10/22/08 or 10-22-08 or 10-22-2008 etc, TextBox2 will get that date and add seven days. View 3 Replies View Related Set Focus Not Working On TextBox After After Update Mar 30, 2014. I am creating an Add ...

Excel Userform Textbox Constant Set Focus. Tag: excel,vba,excel-vba ... the cursor is on the "Scanned Part Number Text Box" or not. That is why I need focus to be on ... May 09, 2009 · SetFocus On TextBox As First Control In A Frame May 9, 2005. In Excel 2000 there seems to be a problem with setting the focus in a UserForm TextBox if the SetFocus method is applied in the same submodule as the UserForm.Show method. Microsoft's circumvention for this is to put the SetFocus command in the form's Activate event submodule. .