application.displayalerts

  1. A

    Stop macro from switching between sheets

    Good afternoon everyone, Sub Stop_Timer() On Error Resume Next Application.OnTime Now + TimeValue("00:00:01"), "IncreamentTimer", schedule:=False If Err = 0 Then Application.ScreenUpdating = False ThisWorkbook.Sheets("Sheet1").Range("L9").Value =...
  2. C

    Endless loop in Email macro - OLE action?

    Hi everyone, Need some help with the following macro <code/>Sub Mailer(SendTo, CcTo, Subj, TxtBody) Dim OutApp As Object Dim OutMail As Object On Error Resume Next Application.DisplayAlerts = False ActiveWorkbook.Save Application.DisplayAlerts = True Set OutApp =...
  3. Alex O

    VBA Edit to Copy all but Sheet2 AND...

    I have my code mostly complete - except for a few minor edits that have me stumped! I need all sheets copied to the new workbook except Sheet2 (ODBC_TABLE). If possible, I'd also like no headings and password protected. Any help would be appreciated. Thanks Sub New_Syscofile() Dim Output As...
  4. M

    Prompt User for Save Location

    Hi The code below takes several sheets in a Workbook and saves each sheets as its own Workbook. It saves the workbooks in the same directory that the source wookbook is saved. But Id like to prompt the user once to select a folder where all the workbooks will be saved. How do I do this ...
  5. M

    Closing a Text File

    Hi We have a system that creates a file with a non-standard extension - filename.0000. So the filename might be NRExport.4567. The next file to be exported would be NRExport.4568 and so on. I open this file as a comma delimited file and perform some cleansing on the file using code. I then...
  6. M

    Saving .xlsm worksheet as .xls workbook

    Hi guys I want to save a single worksheet from a .xlsm workbook to a new .xls workbook, overwriting any version already saved without alerts. I think what I've got is OK but I'd appreciate any words of wisdom from you. Sub SaveAs(grpID As String) Dim fName As String Dim...
  7. J

    Excel VBA: Sort sheets that only have a comma in the tab name

    Hi there I'm fairly new to VBA so please be patient with me :) I have a workbook that will have 60+ sheets. These will be named with clients names, then I have my working sheets. I am trying to sort my workbook by sorting alphabetically those tabs with a "," only but I can't get the script to...
  8. G

    Excel for Macbook Pro error

    Hello Excel Gurus, I have a working macro for Windows but when I bought Macbook Pro and use it, I cannot save it and there is an error when I close and save it. Any help would be appreciated. Please see Macro below. Thank you. Gemini528 [CODE] Sub FileClose() Dim Backup As String myFlg...
  9. D

    Saving Specific Sheet With VBA

    Private Sub CommandButton1_Click() Dim path As String Dim filename1 As String path = ThisWorkbook.path filename1 = Range("K2").Text Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:=filename1 & ".txt", FileFormat:=xlOpenXMLWorkbook Application.DisplayAlerts = True End Sub...
  10. T

    VBA to Save Workbook As

    Hi All I've been using the below macro for a bit to save a file when a commend button is pressed in a specific location with a randomised password. Its started to fail now on the line highlighted in bold. Can anyone see why this would happen? I just cant work it out. Thanks Tom Private Sub...
  11. B

    only works on second pass

    the code below should copy specified cells from open workbook and paste them into a new workbook and save it with yesterdays date. On first pass it opens a new workbook that doesnt have anything in it. On second pass it works. Any ideas? Option Explicit Private Sub CopytoNewWorkbook() Dim myWB...
  12. T

    Filter table and delete - code error

    Guys, I have found this code but i am getting error messages when running it. lo.DataBodyRange.SpecialCells(xlCellTypeVisible).Delete - this brings up and error as does ws.Activate Thanks Sub Delete_Rows_Based_On_Value_Table()'Apply a filter to a Table and delete visible rows...
  13. A

    combine two different VB code together

    Never mind i figure out. Please delete
  14. L

    saveAs run time error

    Hi I opened a new workbook and wrote the code below in a module and tried to run it but got run time error telling me I need to change the extension? any help would be appreciated thank you. Sub wk_save() Application.DisplayAlerts = False Workbooks(1).SaveAs Filename:="hello.xlsm"...
  15. L

    application.alertdisplay - does not work without application.

    Hi I removed application from the second line like this DisplayAlerts = False but that did not work, excel gave me the warning. Why I need to add Application. in this case? because with workbooks, I do not need to add Application. So I can say workbooks.add instead of...
  16. W

    Prevent saving workbook

    So I thought if I placed this code into the Workbook Module it would prevent the workbook from being saved or saved as. What did I miss? Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Application.DisplayAlerts = False ThisWorkbook.Saved = True...
  17. I

    Saving Workbook as .pdf & .xlsm with specific path and filename, FileFormat:=51 no longer works

    This VBA Code below worked for several years and all of a sudden it stops at the line I highlighted in BOLD (ending with FileFormat:=51. This Purchase Order Form with VBA Code saves my PO's in .pdf & .xlsm and adds a line to my log tab, then clears the form. It works on my computer at home which...
  18. B

    VBA Loop through Sheets

    Hello I have a macro that should loop through the sheets until it reaches the sheet named "HO". However it still tries to run the macro on this sheet. Please can someone let me know where I have gone wrong. Here is my code. Sub Nursery() Dim ws As Worksheet For Each ws In...
  19. A

    "Workbook.Close with Save Changes" gets error that file already exists

    I'm trying to save changes to a file and close it. I've read enough posts to understand that I need to set DisplayAlerts to False, but I still get that dang error that the file already exists and do I want to "save a copy". The file was created using a prior "SaveAs" command. I noticed is...
  20. K

    Excel VBA Error When Try To Make A Workbook ReadOnly

    Hi, I have a code in the Workbook_Open event, that is making the workbook as ReadOnly, but some time it works and some time not. I noted one thing that when I opened the workbook, there is a message shows "This file originated from an Internet location and might be unsafe. Click for more...

Some videos you may like

This Week's Hot Topics

  • Use Filter function with 2 criteria to return a specific value
    I've spent many hours trying to find out why the basic formula for Filter function with 2 criteria will not return a value other than #CALC. I'm...
  • Loop stopping at row 10
    Below is a code I had a lot of help with from user such as yourself. This code worked well but now is stopping a row 10 and I can't see why! Could...
  • Numerical Order Code for Macro
    I am trying to find a code or fix what i have on the macro that will automatically make the certain column generate in numerical order when I...
  • Calculate time in excel
    I get a text report from our time keeping system that i dump into excel through a data connection and I need to calculate the total hours for a...
  • VBA
    Hello everyone, I need your help please. I just need VBA code to get my reports working. What I want to do is whenever these dropdowns are...
  • Help with formula to sum numbers prior to date
    Hello, I was hoping to get some assistance as I'm having trouble with this. Using my table below as an example, how could I write a formula which...

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
Top