1. 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...
  2. 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...
  3. F

    Reset button

    Is there an easy way to create a vba button to cancel all current slicer selections? TIA
  4. 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...
  5. 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)...
  6. 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...
  7. 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>
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. G

    VBA SaveAs with vbOKCancel

    Hello I am looking for a way I can open a SaveAs dialog using VBA, then if the user hits cancel it will show a msgbox with "You need to save the document before you can continue." on a vbOKCancel + vbCritical popup. If the user then selects cancel it will close the workbook but if they select...
  20. D

    how to automate listbox

    Hi I have a couple of userforms with listbox I want to open the listbox when I double click on a cell, and when I select an item in the listbox (it's a single select), that item should be copied to the active cell and the listbox should close, I have both single column and multicolumn list boxs...

Some videos you may like

This Week's Hot Topics

  • SUMPRODUCT active link formula
    Hi guys i have sumproduct formula for counting two range of number, i want count active cells of formula that linked to another sheet...
  • Block certain cells in condition met in cell A
    Hi there, trying to figure out step by step how to build macros and learn more. Now given that my other code was a mess, I figured I would...
    Hi, Below formula works well, =(INDEX('PRICE LIST'!$C$7368:$C$7679,MATCH(1,(WORKSHEET!O28='PRICE LIST'!$A$7368:$A$7679)*(WORKSHEET!P28='PRICE...
  • Match data from 3 columns to return data from the correct 4th column
    Hi there! I'm trying to have a cell auto-populate the data in a cell based on the data entered in 3 other cells. I've pasted a copy of the...
  • VLookup
    Hi everyone, I need to find the value from one sheet to another. So in Sheet A Field N5 I have a value (Spark) I want to find Spark on the Sheet...
  • Defining a range
    Private Sub Worksheet_Calculate() Dim Xrg As Range Set Xrg = Range("K1") If Not Intersect(Xrg, Range("K1")) Is Nothing Then MsgBox...

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
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 "".
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