exit

  1. Z

    attempting to code a punch clock

    Layout in columns is: Name, Date, In, Out 1)find name, if not input name, date and in time. (first button push) Punched in 2)check that punch out is empty, if yes, punch out. (second button push). 3)if user presses button again (3) code sees this and says already punched in. Current code I...
  2. M

    Why has my code stopped working?

    All The intent of this code is to find the last filled cell in column 16 and move onto the next column, gather all the information in that row from columns 1-15 and input them in a form. It was working fine yesterday, now all of the sudden it stopped working. It always goes back to the first...
  3. welshgasman

    Test for #N/A or not?

    Hi all, I have some code with which I am trying to see if I have anything to copy. If not I want to exit the macro. I add code that does a VLOOKUP against another workbook. Anything not found (#N/A) I want to copy. Code works fine when there is something to copy, but when nothing to copy it...
  4. D

    Save as PDF and send email

    Hello, I am new to forum and also a beginner at VBA. I am trying to run the following code and I get a compile error "Sub or Function not defined. Any help would be appreciated. <code class="vb keyword" style="white-space: nowrap; padding: 0px !important; font-family: Consolas, "Bitstream...
  5. J

    Input box VBOKCancel problem

    I'm having an issue with an application.inputbox in a macro. It keeps popping up with a "1" in the user input section when the message box initially appears. Why is this happening? Dim BeginDate As Variant ShowInputBox: BeginDate = Application.InputBox("What is the first day of the next month's...
  6. T

    VBA Help

    I'm very new to using VBA so I'm sure this is a simple fix. I want a message box to display information when a defined item is picked from the validated drop down. I thought I had this all figured out when the message box started to haunt me. If I select the validated word all other drop down...
  7. Z

    VBA Refreshing query throws TYPE MISMATCH in code

    I have some code which goes about identifying changes in specific columns in a range. Things work fine until I try refresh the query, Excel identifies that as a change and throws a TYPE mismatch error. Thing is, the range I am working on is not part of the query, and when it refreshes it...
  8. muhammad susanto

    Macro : Find Data Number in Only Cell Certainty in Multiple Sheets

    hi all... how to modify this code : i want spesicifik find in only cell AD, row 14 Sub SearchAllSheets() Dim ws As Worksheet Dim rFound As Range Dim strName As String On Error Resume Next strName = InputBox("What Name?") If strName = "" Then Exit Sub For Each ws...
  9. M

    Disable workbook X, use userform exit button

    I have a button on my userform that performs the following Private Sub btn_exit_Click() ThisWorkbook.Close True Application.Quit End Sub I want to prevent the user from using the workbook X to close the workbook and force them to use the button. Everything I have found prevents the X from...
  10. G

    Exit Sub if No Contents Exist

    Hello All Sheets("Template").Select Range("A9").Select If Selection <> contents Then Exit Sub End If I'm trying to not run the sub, if Range A9 in the Template worksheet is blank (no data exist). If A9 has nothing in it, the Template work sheet simply remains the same...
  11. tf37

    Fill rows by user input message box

    Found this thread from 2010, but wish to expand on its function My commented lines show what I’d like to do with it, but in short ' if user entered with no value, it should resume at that place it left off in the row population ' as it is, it is skipping a row and leaving a blank row with no...
  12. C

    VBA Textbox Requires @ Symbol

    - I have a userform textbox in which applicants input their email Question - I want the @ symbol to be mandatory - I want a message box to show if there is no @ symbol inputted My current code is as follows (I have both a Change and Exit sub, I know I can dump them into one Exit sub, but I...
  13. steve case

    Can I paste to the target in a worksheet macro?

    Here's my code that cuts the target contents from sheet1 onto the clipboard Private Sub Worksheet_SelectionChange(ByVal Target As Range)If Target.Count > 1 Then Exit Sub If Intersect(Range("A2:I9"), Target) Is Nothing Then Exit Sub Application.CutCopyMode = False Target.Cut...
  14. Trevor3007

    run vb based on cell chance

    hi, I have the following code:- Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Set Target = Range("d3") If Target = "" Then Exit Sub On Error GoTo Badname ActiveSheet.Name = "Mytimes_WC_" & Format(Range("d3").Value, "dd-mm-yyyy") Exit Sub Badname...
  15. A

    Loop through two columns and paste matching cells to a new sheet

    So... I have 'some' code written, but I am fairly new. Let me explain what I am trying to achieve. I have two worksheets. I am needing to compare ws1 column A against ws2 Column D. if the cells match, I am needing to copy ws1's column D's cell value to a new worksheet.... So on the code below, I...
  16. C

    Stop people opening wrong file

    Hi Guys, I have a workbook that has to be in a certain folder because other users were saving copies instead of shortcuts so we had duplicated sheets so I added some code with the help of your good selves but the company have now added another path to the same folder, how do I add the second...
  17. E

    Custom FaceId Menubar

    Trying to change the FaceId -this is my current Menu on the exit with a customized faceID -the ID in red I want to change to a bmp picture Private Sub Menu1_Lb_Click() sPopMenuOpt = "" PopMenu1 MenuBar_Fr_Reset Select Case sPopMenuOpt Case "" Exit Sub...
  18. M

    Lookup Problem

    CAn you please have a look on my code and tell me what is missing? Private Sub cmdProcess_Click() Dim z As Long Dim UserName As Variant Dim NameLookup As Variant Dim strPName As String Dim sFindIt As String Dim iFoundPass As Integer sFindIt = PayoutFrm.txtSerial.Value If...
  19. R

    Closing UserForm with Timer (userform shows on IF statement)

    Have one more question for a unique setup. I know that my code is very much not efficient, but I understand it and thats important to me. Here is what I'm trying to do. When the user clicks the CommandButton1, Excel verifies each textbox has information in it. If so, the last step is to check...
  20. R

    Closing UserForm that has IF statements within

    I have an issue that may be easy for an experienced VBA user. Sorry, I'm just really beginning to sense the power this useful tool has. I need to hide the UserForm once the user has clicked the "Lock" or "Unlock" buttons. I'm sensing there is an issue with the IF statement in the code but I...

Some videos you may like

This Week's Hot Topics

Top