cancel

  1. S

    Dates Switching from Form to Cell

    I have a form with 2 date fields which have some formatting options in the VBA code. When I put in a date like 10/08/2018 in the form... when it puts the date in to the corresponding cell on submission, it's switching the date to 08/10/2018. I've formatted the cells to dd/mm/yyyy and the...
  2. I

    Check form before submit

    Evening, I have a working code that checks text boxes before the form is submitted. Also on the form are 3 CheckBoxes & 3 OptionButtons Below is the working code which works fine for the TextBoxes but now i need to allow for 3 CheckBox & 3 OptionButton Please can you advise. Private Sub...
  3. I

    Put Values on Orizontal

    Hy I need some help I use this vba code to put target valule in VERTICAL LINE Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Intersect(Target, Range("C15:C89")) Is Nothing Then Cancel = True Cells(Range("A100").End(xlUp).Row + 1, 1) =...
  4. ACommandLineKindaGuy

    When is a number not a number?

    I have the following code to check the input of a Textbox. So, for say TextBox301, I call a routine to validate the number I enter. I have a lot of groups of TextBoxes and they all have different maximum integer values, so I pass the maximum value using public constant n: <code>Private Sub...
  5. I

    Double click to open useform

    Hi, I am using the code supplied below. At present i have the range as A3:A100 In future i dont want to start fault finding why it doesnt work when my entries go over A100 so how can i edit the code so it will overcome this. I could put A1000 but this is an example of me trying to explain as...
  6. D

    Userform Value <>

    Hello, I currently have the following: Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean) If TextBox9.Value Like "*[!0-9]*" Then MsgBox "You must provide a numeric value in this TextBox!" Cancel = True ElseIf TextBox9.Value > 2 Then MsgBox "Invalid Pick!"...
  7. D

    Userform Error

    Hello, I currently have: Private Sub TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean) If TextBox3.Value Like "*[!0-9]*" Then MsgBox "You must provide a numeric value in this TextBox!" Cancel = True ElseIf TextBox3.Value > 26 Then MsgBox "Invalid Pick!" Cancel = True...
  8. S

    How to use the 'X' button to cancel

    Hello Everyone, I am having trouble when using my forms. Whenever I used this code, the form will not allow me to close the form using the 'X' button and instead having to click cancel to close. I have been tasked to takeover a marco from a previous designer and I am wondering if there is a way...
  9. Pinaceous

    Sub PromptPrinter()

    Hi Al, I'm using the following code to call a printer. Sub PromptPrinter() Application.Dialogs(xlDialogPrinterSetup).Show End Sub How do I add if the user clicks the button that the sub can provide a Msgbox "Cancel" ? Thank you! pinaceous
  10. M

    Make cells mandatory ONLY for other users not me as the editor

    I am making cells mandatory to fill before save in excel. however I cannot leave them empty as then it wont let me save the document. i want to be able to save the document with the cells blank but I dont want others to be able to save the form blank. here is my code: Private Sub...
  11. J

    Count # of Times Cell is Activated

    I currently have a workbook that is locked where users can tab through and enter data. I am trying to get a count every time Cell G5 is activated (either through tabbing or clicking). I currently am using this code: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As...
  12. R

    Run 3 Subs???????

    The issue is I have 3 sub procedures to click to get 3 different files with the right click button. I use the file names to run the report but I cannot figure out how to run the 3 Sub procedures back to back as the 3 files are selected. I tried a macro to ruin them to no avail. Here are the 3...
  13. N

    VBA Function - IsNumeric Allows some Special Characters

    Hi, 1st time on here so bear with me. I have written the following code, to ensure only numerical values are entered in a VBA form input box; Private Sub OperatorNumber_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean) If Not (IsNumeric(OperatorNumber.Value) = True) Then Call...
  14. K

    How to get application username

    Hi all, I am using the following but not getting the application username. Can anyone please help me? Thanks Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim r As Excel.Range Set r = Union(Range("A1:A5"), Range("C1:C5")) If...
  15. J

    VBYesNoCancel Dialog Box Giving giving dreaded run-time error

    Hello All, I am new to this forum and have come seeking your advice. As my title suggest I am currently trying to override my previous save file that is saved in a specific location. However, it is not always the case that I want to save it in the specified location but instead am trying to...
  16. I

    Call Userform Only for Empty Cells

    Hello I use this vba code to call Userfrom : Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Application.Intersect(Target, Range("B1:B22")) Is Nothing Then Cancel = True UserForm1.Show End If Please tell me which are the...
  17. J

    Disable Save when Cost Center does not fall into the correct LOB

    I am fairly new to VBA and was given the task to disable the save feature on EPM if a Cost Center is an incorrect value, creating an incorrect LOB. I need the Cost Centers EPMMemberProperty to be equal to LOB_400 in order for it to save, and if it is not I need it to cancel. The data provided in...
  18. J

    How to disable Save Data in EPM if the EPMMemberProperty is not equal to LOB

    So I'm new to VBA but I was given the task to make it so if somebody puts the wrong cost center into cell C27 and it does not fall into the right LOB category, a message box pops up and tells you you may not save due to cost center entry. The code should also cancel the save action unless a...
  19. S

    If Function with 2 Separate Ranges

    Hello, I am attempting to return a value from a range of cells, based off another range of cells. Here's an example of what I would like to do: Tab 1 A1 - Is one of ten hand-keyed in options (cancel, order, hold, etc.) B1 - Returns a date from a range of dates located on a second tab, based...
  20. I

    Cancel A vba Code

    Hello In active sheet I use this VBA code to insert new rows just by double clicking mouse button. The Code: /// Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) 'Updateby Extendoffice 20160725 Application.ScreenUpdating = False Cancel = True 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