cancel

  1. S

    Copy a cell text without any line break

    Good day, I need a Private sub when double clicked on a cell it must do the same as putting the cell to edit mode F2 and highlighting/selecting all text and copying it to clipboard. Currently it copies the text but when pasting in another program it pastes with multiple line breaks and i have...
  2. L

    Cancel = true

    Hi I have a form which has 2 text boxes, one for userName and one for password and 2 buttons, one Enter and one Cancel. The article below is saying I need to make Cancel properties of a command button to True then I can use ESC key to cancel. I want to understand that better. So here is my...
  3. C

    Cancel Change Event When Saving File

    I have a workbook to create a daily dashboard for our group. I have created VBA code that automatically updates a particular cell with the last save date & time when the file is saved. I had the code in the BeforeSave event, but the problem is that if I cancel the save operation the cell date...
  4. N

    VBA - Error handling for when file "save as" is No or Cancel

    Hello, Although my code works I am trying, gradually, to make it more efficient, and I am at the stage where I want to do something if, during the File "save as" command, the user does not want to overwrite an existing file or presses cancel. My code for saving the workbook is: FPath =...
  5. D

    DoubleClick event- procedure too large. How to split it up?

    I created a worksheet that contains many unique formulas in each cell. The user is allowed to overwrite and/or modify the formulas in each cell, but double-clicking on the cell will always reinsert the original formula into the cell. The original formulas are contained within the VBA Objects...
  6. K

    Trigger VBA on double click

    Couple of questions. I want to apply an advanced filter based on the cell that is double clicked. This works Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Global_Filter End Sub I have a few questions 1. The Sheets "Data" is deleted and recreated as...
  7. R

    Stopping code from inside a userform??

    My code calls a userform within which I placed a "Cancel" button intended to stop all code. However, I can't figure out how to make that cancel button actually stop the code. I tried a global boolean but despite being set true in the userform form, it stayed set as false in the code that...
  8. R

    Need help tweaking VBA code

    Hi all I am using this code to fill in numbers in sequential order when double clicking in a cell. So, if number 1 is in F1 and I double click in F10, 2 thru 10 will autofill down. The issue that I am having is that it is copying the format as well. I would like just the values to copy down...
  9. S

    Closing UserForm with Cancel commandButton

    My form has multiple text boxes and a combolist. Two buttons on the bottom, one for adding info into the spreadsheet, one for cancelling. When I click the cancel button, I get a 'Runtime error 91': Object variable or With block variable not set. My code is below. What am I doing wrong? Private...
  10. rinneii

    Macro Codes for Buttons in a Form

    I'm trying to make 2 buttons for a query that will go in a switchboard. The two buttons I'm trying to make are going to be called Add and Cancel. Add, will obviously add the new records created in the form, and Cancel will just close the form. My issue is I don't know how to go about...
  11. I

    Format question for double click = enter date to active cell

    Afternoon. As per title. When i double click a cell within the range mentioned in my code it should enter todays date. The code below works fine apart from how the format date is entered. So today its entered as 3/25/2019 but i would like to to be formatted & entered as 25/03/ Private Sub...
  12. M

    Would it be possible use double clicking on cell for following 3 subs?

    Hello,</SPAN></SPAN> For now using 3 different worksheet functions to select entire C:H columns for 3 different targets cells "1st for L:V", "2nd for AB:AL" and "3rd for AO:AY"</SPAN></SPAN> Would it be possible use " Worksheet_BeforeDoubleClick" for all targets? </SPAN></SPAN> Data looks...
  13. I

    Identify & edit code

    Morning, I am not sure which part of the code below adds a following digit of 1 each time the same name is entered. If the name exists then a 2 would be added to the end of that name. Should then that name be entered again then this time it is followed by 3,in the future 4,5,6 etc etc Can we...
  14. J

    Sort columns in range based on selected row

    Hello, I'm trying to sort the columns in a range of data based on a selected row. I found this code to start with but haven't the knowledge to modify and would appreciate help from someone in the community please. Here's the code; <code style="margin: 0px; padding: 0px; font-style: inherit...
  15. K

    Application.InputBox - "Cancel" button

    I am having trouble coding a macro in the case where the response to an InputBox request is the "Cancel" button. As I understand it, the cancel button returns the value "False". The following code results in "Type Mismatch" error 13 at the "If Q = False" line. Q has been defined as a variant. In...
  16. P

    Textbox to update into date format

    Hi, good afternoon, i have the code below, where if i enter a date into the text box like 121219 or 12122019 it should convert to 12/12/2019 but it doesn't it either says date incorrect or change it to 23/23/2023 which is wrong, please can you help. Private Sub TextBox1_BeforeUpdate(ByVal Cancel...
  17. I

    Userform To Worksheet Transfer

    Morning, I have a userform that opens when i open my worksheet. I am having difficulties with the code where i press the CommandButton2 to then transfer the data ive just entered in the TextBoxes on my form to my work sheet. Here is some info to help you. The information needs to be placed...
  18. I

    Advice for userform code

    Morning, I have a userform which opens when i first come to the worksheet. I then enter all the data in each TextBox & when i press a button the data is then entered into the worksheet. Once the item has been delivered to the customer i then like to enter the date of its delivery. At present i...
  19. N

    How to get list of in-between dates in dd-mmm-yyyy fromDate and ToDate

    Hello How can i list down the in-between dates in (dd-mmm-yyyy) format from below textboxes ie txtFromDate.text and txtToDate.Text also the list to contain the dates txtFromDate.Text and txtToDate.text with in-between dates Option Explicit Dim fromDate As Date, toDate As Date Private Sub...
  20. D

    VBA do not allow to save if row count does not match

    Hi, I am looking for a code that would prevent user from saving the file if count of no empty cells in column "E" is different than in columns "F"-"AE" Any ideas?? I tried with below but failed Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top