set focus

  1. P

    Setfocus vba to combobox

    Private Sub cmbSDPFLine_Exit(ByVal Cancel As MSForms.ReturnBoolean) Dim rtn_ans1 As String If cmbSDPFLine.Value = "" Then rtn_ans1 = MsgBox("Please select a production line.", vbOKOnly + vbExclamation & "Please Select Production Line") End If Select Case rtn_ans1 Case 1...
  2. N

    Userform Textbox Focus

    Hi everyone, I am making a simple userform with a couple text boxes and 2 buttons. I am having a terrible time setting up the userform to set the focus of the cursor to my textbox after pressing enter - I want the focus set to this textbox every single time I press enter. This is my code, my...
  3. D

    VBA to go to specified folder and open it

    Dear Excel Experts, I found a great sets of macro that can split multiple tabs in one workbook into separate workbooks and save them in a folder and pop-up msgbox mentioning that they are saved in a specified path. Upon clicking "OK" on the Msgbox, we can either make a macro line to point focus...
  4. J

    VBA Return focus to a text box within a frame

    Hello all, Today I am working with a text box that is the last in a frame. I've been trying to make a message box appear if the user types too many number in textbox1. I used an exit event for textbox1, but I guess that doesn't work because it is within frame1, and the next object in the tab...
  5. M

    problem with setfocus

    I'm having problems with setting focus on a text box from a textbox_change() event. What I want to happen is when the text in the box gets to a certain length it triggers an event, clears the text box and sets the focus back on the now blank text box. Here's the code: Private Sub...
  6. D

    How to setfocus textbox framecontrol

    I created two (2) textboxes inside a frame. The frame I created is on a worksheet (not using USERFORM). What I want to do is have the cursor on the first textbox when I first open the worksheet. My code looks like this: Frame1.Controls("textbox1").setfocus . But, when the code executes, I...

Some videos you may like

This Week's Hot Topics