focus

  1. S

    TextBox Exit Event

    Hello Everyone, Have used this site many times as resource for my excel vba needs. Was hoping an individual could with a specific problem involving Win10. I have developed a userform to assist in a rework process. Intended result is user to enter a serial number using a textbox, if...
  2. S

    Set focus back to seme TexBox

    Hi all, On UserForm I have textBox were user should enter school name, I would like, if the name already exists, to get message that the name exists & Focus stays in same TextBox (not move to the next control) Thank you in advance.
  3. I

    ComboBox set focus

    Hi, Can you give some pointers please. I have a userform on a worksheet then opens automatically when you visit the page. Ive looked for this set focus code but dont find it anywhere. Can this be written another way as opposed to set focus. I just cant seem to find where its being controlled...
  4. R

    Worksheet Background

    Hi, I am wondering how to do this background in excel. Grid lines are not showing and the focus is just on the worksheet https://www.dropbox.com/s/5jd8kus6f3p21hh/Product-Selector.xlsx?dl=0
  5. mayday1

    Focus question

    My macro does things to a file, File1 - a file with a different name every day. Then it looks up some data from a tab in another file and uses that data to do stuff in the first file. At least it should. The ThisWorkbook.Activate doesn't make the macro stay focused on the first file. When it...
  6. D

    User form Cancel button not working when focus in a textbox that fails validation

    I have a UserForm with a number of textbooks plus OK and CANCEL buttons. One Textbox (for Age) gets validated in the Age_Exit Sub. If no age is entered, or if too high, then a MsgBox is displayed showing the error, Cancel is set True and the sub exited. This returns focus to the Age TextBox for...
  7. S

    Excel slow when not in focus

    Hi everyone, I have a large Excel file with a long macro that needs to run. I am *not* looking for ways to optimize my Excel file or the macro code in order to increase its performance. Performance (duration of the macro) is perfectly acceptable as long my instance of Excel remains 'in focus'...
  8. SlinkRN

    Button needing 2 clicks after changing focus to another program

    Hi all, I am using an Excel automated sheet to prompt users on what to enter into another program. After they switch focus to the other program (not Excel) to enter data, when they come back over to the Excel sheet, the button shape that I have added with code attached only works on the second...
  9. Roderick_E

    Sheet Focus

    I'm using a Userform.show vbmodeless to float above the worksheet I'm using. I'm having to utilize form buttons to interact/transfer data between one workbook and another and I sometimes click between the sheets. THE PROBLEM: Sometimes when I click on one workbook's sheet, it seems to think...
  10. A

    Combo Box Lose Focus

    What's the correct way for a UserForm) combo box to Lose the focus? I anticipate calling this from the cbo_Change event. I did try to setFocus to a text box (left = -50) but you still see a flashing cursor , so made the left -999 and locked = True. That did it but seems a hack and there must be...
  11. I

    Two codes the same but question about set focus

    Hi, I am using a code that was advised this morning & it is working fine. When i open the worksheet the form opens up & the first ComboBox is set at focus where the cursor is flashing. Ive used the same code on another worksheet & edited the range etc but i dont see the focus at all & would...
  12. N

    What is Alternate method to change Focus from TextBox to another Control ?

    What is Alternate method to change Focus from TextBox to another Control whose following properties are Textbox1.EnterKeyBehaviour = True Textbox1.MultiLine = True Following does not Trigger to set focus on another control Private Sub Textbox1_KeyPress(ByVal KeyAscii As...
  13. C

    Custom Ribbon

    Hi Is it possible to have a callback for the ribbon when a key is pressed, rather than when they press 'tab' or 'enter' - for a dynamic search? Also, is it possible within VBA to set focus on a Ribbon Control? E.g. after the macro has executed, to go back to the text box in the ribbon? Thanks...
  14. K

    Changing cell value through VBA

    I have empty worksheet where I created a module with following Function ChangeValue() Range("B5").Value = "Hello" End Function It was my belief that entering =ChangeValue() on A1 would be enough to change value on B5 to "Hello" But instead cell focus simply move to B1 and doesn't do anything...
  15. M

    Excel Powerpivot pivots constantly refreshing

    My understanding is that in Excel 2016 if you keep the focus on the datamodel the workbook pivots should NOT refresh. However my model refreshes pretty much ever time I enter anything in the datamodel which is making it extremely tiresome trying to build out the formulae. Is there some setting I...
  16. W

    Run maco on loosiong focus

    I am running code when a worksheet comes into focus using Private Sub Worksheet_Activate(). How can I run a code when the worksheet looses focus?
  17. B

    How to set focus on a tab on a userform?

    Hi, I have a user form that has tabs on it. When I click a button to open the form, I then initialize the form. I have CustomerName.SetFocus which is the first textbox on the first tab. I have found a bug where if the user is on the forth tab for example and closes the application, it will...
  18. G

    Set focus to embedded text box upon workbook open

    I have read through quite a few threads. So far they related to higher level issues or something totally different, so I'm led to my first question on Mr. Excel... Which I'm sure is probably my first dumb question, as well. I have a work book with only one sheet. I use it to create barcode...
  19. M

    AfterUpdate Event

    I have a textbox in a userform and would like to get the 'name' of the textbox upon the AfterUpdate event executes. At the moment I am using ActiveControl.Namebut as the focus has changed to the next control in the TabIndex, it returns the name of this control rather than the textbox that has...
  20. E

    CommandButton sometimes causes an unspecified error

    Hi This is my first question. I have a command button (SaveChangesBtn) that I wish to set focus to under certain circumstances. On many occasions the button works fine, but occasionally I get an unspecified run time error. It is at the following point in the code POpenIssuesRowID = r.Row -...

Some videos you may like

This Week's Hot Topics

Top