unload

  1. D

    How to choose a specific cell when a form closes

    Hi all, I'm quite new here and new to vba. I have a worksheet that opens a pop up calendar when I click on a certain cell. When I then click on a date on that pop up it puts the date into that particular cell and then the calendar closes. This is all good and working. Is there a way that when...
  2. D

    VBA - What variable types should be manually unloaded at the end of a macro

    Hi, I'm trying to make myself a cleaner coder, and hopefully write code that does not slow down every time I run it. Can anyone help me with a list of variable types that need to be set to nothing or unloaded from memory manually at the end of a macro? Thank you, Daniel
  3. K

    Multiplying and dividing textboxes

    Hello all, I was wondering if any one can help with this: Private Sub Userform_Activate() TextBox3.Value = Sheets("Template").Range("AW" & Day(TextBox1.Value) + 7).Value End Sub Private Sub CMDADD_Click() Sheets("Template").Range("AW" & Day(TextBox1.Value) + 7) = TextBox2.Value /...
  4. S

    Upgraded to Windows 10 and broke passworded textbox

    Any idea why upgrading from Windows 7 pro to Windows 10 would break a passworded textbox? Yes, they checked the caps lock key. Every machine they upgraded now gets "The password was wrong, try again." Yes/No All machines (Win7 and Win10) are using MS Office Professional Plus 2016 32 bit...
  5. E

    Elseif issue

    Not sure why this gets an error. It seems pretty simple. Error occurs at the ElseIf "Application.GoTo ActiveWorkbook.Sheets("Scores").Cells(3, 1)" line I replaced it with the App GoTo line above and if functions as it should, so its not liking the "Scores" name. Spelling correct, same...
  6. E

    Option Button/Sorting

    The project has grown and has a few pains still and this is one. Sometimes it will work and sometimes it doesn't and not sure why. The objective is to sort on Col "J " within a range. Seems simple. We never allow more than 50 entries, so I first setup the range @ "A2:A50", but if there were...
  7. K

    Modeless form with "Cancel" button

    I have a following situation. Form1 runs a printing routine after clicking OK. Then Modeless form Form2 shows up with info what is being printed now. I need a cancel button on Modeless form Form2 to stop all remaining tasks and exit. At the moment cancel button in Form2 I have cannot be clicked...
  8. M

    UserForm multiple TextBox values need to shorten formula

    Hello, what is the way to shorten this formula: Private Sub CommandButton1_Click() Dim ws As Worksheet Set ws = Worksheets("Settings") Unload Menu With Menu_Names .TextBox1.Value = ws.Range("V2").Value .TextBox5.Value = ws.Range("V3").Value .TextBox9.Value =...
  9. R

    Userform startup position

    Greetings, I am using the following code to open a number of userforms simultaneously in a cascade layout. The first code (cleanroom zone) runs perfectly and the userforms layout just as I want them to. But the second one (grayroom zone) doesn't. The userforms do not start up in the same...
  10. A

    Propertry Get / Form Usage

    If I want a Form to 'remember' some values I can't unload it and then use Property Get? Correct? The right way woudl be to Hide the Form only. Then the Form Variables using Get will work 100%. This is no need to ever unload the Form?
  11. O

    Unloading userform doesn't seem to work

    Hi there, I am using Excel 2013 and am getting some strange behaviour when unloading a userform using the "Unload Me" statement. From what I understand the Unload command should remove the instance of the userform from memory. However even after the unload statement has executed, I am still able...
  12. M

    Unload/Unhide Sheet Based on Name

    Hi, I am trying to unhide a very hidden worksheet based on a name picked from the drop down list. I am getting a Run-time error 91 Object variable or with block variable not set on the "If ws = Worksheets("Administrator").Range("B9").Value Then" line. Any ideas on how to fix this? Code: Dim...
  13. G

    Completely Turn Off User Form

    frm_pdfimp.Show Hello All, I have the above code. Instead of simply hiding it at the end of the program, I want to completely unload it. I tried Unload Me, but it faulted on me. What am I doing wrong? Or, do I have to say the name of the User Form with Unload Me? Thanks
  14. S

    Splash screen that won't Unload

    I've created a splash screen that opens when the workbook opens as planned, but does not unload after the required 3 seconds, it just stays open and does not seem to call the Sub that should close it. I'm using the code Application.OnTime Now + TimeValue("00:00:03"), "UnloadSplash" , and...
  15. sunyem

    UserForm_QueryClose Not Responding

    Hello Everyone, I am trying to create a sub (BOX_TYPE)that opens a userform. Since this is a step in a series of subs, I wanted to add the option of confirming closing the userform in the event of clicking on the close button (top right [X]). I manged it using this code: Private Sub...
  16. L

    MessageBox opens multiple times

    Hello everyone! I have a MessageBox in my application that asks whether the user wants to add a new product to the order or not. If I press 'No', it closes. When I press 'Yes', it does what it's supposed to do, lets me add another product, and so on. The problem is that once I press no, the...
  17. F

    Userforms and memory issues

    Good morning. Ive been creating a couple of userforms and I notice that when I test all functions and changes I make I keep getting this error "out of memory" in my excel . I think the userforms are the issue. Typically during testing , the userforms are loaded and unloaded a ton of times...
  18. S

    [VBA] Reference to commnadbutton's property without directly using its name

    I have a around 10 cFmtCell commandbuttons on a userform. Instead of repeating the following code for 10 times, with varying indices at the end, is there a more convenient way to write the code? Private Sub cFmtCell7_Click() Call FmtCellTxt(cFmtCell7.BackColor, vbWhite) Unload Me End...
  19. D

    Userform "X" close button not working second round

    I have 2 userforms name "Home" and "Permanent". Home has several command buttons on it and one of them is set to close home and open permanent as follows. Unload Home Permanent.Show The "Permanent" userform has several controls on it that are editable by the user however, I do not want to...
  20. T

    Userform can't close if refedit in focus

    Hey guys. I've got a userform with a few different refedit objects, and if one of the refedit objects is in focus, or in use, when the user presses the cancel button to close the form the form will close, but Excel becomes stuck in a "select a cell" mode for the previously in focus refedit...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top