cancel

  1. I

    Insert Row by Double Clicking

    Hello I use this VBA code to insert rows in active sheet just by double clicking a cell (doesn't matter which cell) Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Application.ScreenUpdating = False Cancel = True Target.Offset(1).EntireRow.Insert...
  2. M

    Compile error message

    hello, I used a VCA formula in my spread sheet. I want to do the exact same thing, but in a different area of the spread sheet. This is the formula i used and it worked in one area, but not the other. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not...
  3. P

    command buttons not working

    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, "Please Select Production Line") Select Case rtn_ans1 Case 1...
  4. M

    Changing cell color in a range of cells

    Hello, I have figured out the VBA formula to change cell color when double click, right click etc... however, i only want it to this on a specific section of the worksheet and not the whole worksheet. Here is what i entered in the VBA Private Sub Worksheet_BeforeDoubleClick(ByVal Target As...
  5. F

    Reset button

    Is there an easy way to create a vba button to cancel all current slicer selections? TIA
  6. R

    Writing BeforeDoubleClick VBA Code

    Hi there, hoping someone can assist, this is my first post so apologies if i haven't quite got to grips with the posting process yet I have a Private Sub routine currently set up in one of my excel spreadsheets which works well the code is as follows: Private Sub...
  7. P

    Moving and/or deleting blank rows

    Hello everyone I have solved all of my problems thus far thanks to your help and now I have one last issue on my current problem that I didn't think about until just now. The current code cuts rows that have been completed or placed on hold from sheet 1 to sheet 2 (complete) or sheet 3 (hold)...
  8. C

    Hyperlink to another sheet that auto sorts to matching names

    Hello, I have 2 sheets, Sheet1 "Capture" Sheet2 "BD TASK TRACKER". I am trying to have a link for each opportunity on Sheet1 that you will click and it will find the tasks associated with the Capture reference. Both sheets have the same format, Column A "Client" Column B "Title" ,etc. etc. I...
  9. D

    Prevent save as with VBA

    <code>Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) MsgBox "You can't save this workbook!" Cancel = True End Sub I can't seem to prevent the user from saving as and creating a new workbook, and yet still allow them to save the workbook regularly. </code>
  10. J

    Action A Macro on enter in a worksheet

    Hi I have a list of dates for product to be dispatched in column B and I'm trying to get the date beside in column C for the start of production (10 days before dispatch date). This works fine while I am using Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) but...
  11. phillipclark

    stop Pop Up do you want to Save?

    Good afternoon All, I am using the below code when the close button is used to ask the user a series of questions based on yes or no answers. This works fine and I have no issues. The problem i have is that excel will have the pop up asking the user to save the file. I am already using a macro...
  12. M

    input cancel not working when using if statements

    Hello, I'm trying to use application.inputbox with nested if statement but something is going wrong. So basically what I want done. there will be a button on the spreadsheet that when pressed will run the macro. But I don't want just anyone to run the macro. so I want to make it password...
  13. R

    Speed up code

    Oh my goodness I have been posting a lot!!! But I am so close to getting my project done and these few last details are making my brain hurt lol... So once I insert this code on my Sheet it goes super slow inputting data from userform to sheet1. Is there a way I can modify it to speed up the...
  14. S

    VBA - Double click and change colour

    Hi There, I'm newby so please forgive my stupid questions. I got this code from internet (maybe from this site) which works perfect in PERSONAL.XLSB. My intention is to use GENERAL for all open excel file where PERSONAL.XLSB contain this code: Private Sub Worksheet_BeforeDoubleClick(ByVal...
  15. sharky12345

    Disable X to close Excel

    I'm trying to find a way to close a Workbook through a Macro and prevent closing with the standard X in the corner of the application. I have this so far; Private Sub Workbook_BeforeClose(Cancel As Boolean) If Cancel = False Then Call MsgBox("You must use the Close button on the menu to exit...
  16. C

    Cancel Button is not clickable when macro is running

    I create macros to find and replace texts in word documents. Consider the number of documents, I add a Cancel button to let the user to cancel the loop anytime. But the problem is, once the loop is started (start button is clicked) then Cancel button is then no longer clickable. How to keep the...
  17. B

    How to create a Reset instead of clear all button

    I'm changing the background color of cells from black to green when clicked once. I can change the background cell colors from green to black when I right click. Is there a way to create a Reset button that will change all the changed cell colors back to black from green when clicked instead of...
  18. H

    Required Fields

    I have a workbook containing a sheet requiring data in specific fields before the user can close the workbook. However, I need for users to be able to copy the sheet to create new ones and have Excel stop the close if they don't enter data in the same cells on the new sheet. Right now the...
  19. W

    Continue on next row in same cell VBA

    Hi, I have a userfrom that opens up on the click of a cell and then enters data into the active cell and then the cell to the right on the click of the Finish button: Private Sub FinishButton_Click() Application.ScreenUpdating = False If Defect_Box.ListIndex = -1 Then Cancel = 1 MsgBox...
  20. M

    Required Fields Code - Still adding record with missing required fields

    Hello, I have the below required fields code that I am using to ensure all required fields are filled before adding a record to our table. However, it is still adding the record even if I leave some of the required fields as blank. Dim msg As String, Style As Integer, Title As String Dim nl As...

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