+ Reply to Thread
Results 1 to 9 of 9

Auto close 'overwrite existing data' box

  1. #1
    Registered User
    Join Date
    09-15-2020
    Location
    Vilnius, Lithuania
    MS-Off Ver
    MS Office 2010
    Posts
    20

    Auto close 'overwrite existing data' box

    I am very new to excel's macros and vba coding...

    I've made my first macro to run 16 regressions, but 16 times I get the warning box for overwriting existing data, so I have to click OK button 16 times in a row and it annoys me.

    Application.DisplayAlerts = False
    I tried this solution, put it everywhere in the script but it doesn't help.

    Any ideas?

    Thanks!
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by paupaj; 10-19-2020 at 03:45 AM.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Auto close 'overwrite existing data' box

    You just place Application.DisplayAlerts = False before the process is invoked and don't forget to set it back to true after the proces is completed
    Without a sample of what you're doing that's all I can say
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    09-15-2020
    Location
    Vilnius, Lithuania
    MS-Off Ver
    MS Office 2010
    Posts
    20

    Re: Auto close 'overwrite existing data' box

    Here's my simplified code I'm working with.

    Attachment 700241

    Tried Application.DisplayAlerts = False before the code, in between all regression lines, nothing worked.

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Auto close 'overwrite existing data' box

    invalid attachment - paperclip does not work - follow instruction on big yellow banner.

  5. #5
    Registered User
    Join Date
    09-15-2020
    Location
    Vilnius, Lithuania
    MS-Off Ver
    MS Office 2010
    Posts
    20

    Re: Auto close 'overwrite existing data' box

    Added a simplified excel workbook

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Auto close 'overwrite existing data' box

    @papaj: not much use without the workbook it refers to !!!

  7. #7
    Registered User
    Join Date
    09-15-2020
    Location
    Vilnius, Lithuania
    MS-Off Ver
    MS Office 2010
    Posts
    20

    Re: Auto close 'overwrite existing data' box

    @Keebellah: Sorry, I don't understand... I can't find how it is refered in another workbook... I've just created this new file , created new macro and uploaded

  8. #8
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Auto close 'overwrite existing data' box

    Toen i suggestie you take a look at the file you attached

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Auto close 'overwrite existing data' box

    This is the macro named Regression in your attached file:

    Please Login or Register  to view this content.
    I suggest you explain this: "ATPVBAEN.XLAM!Regress"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. overwrite / clear existing data before copying
    By scouse13 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-12-2020, 12:37 PM
  2. Adding auto-close code to existing?
    By barbd777 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 07-25-2016, 06:51 PM
  3. MACRO to split new data into multiple tabs but not overwrite existing data
    By amo899115 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-11-2016, 01:42 PM
  4. [SOLVED] Userform Have Text Boxes Auto Populate Based on Combobox Selection & overwrite existing da
    By Rajesh shishodia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2015, 02:06 AM
  5. [SOLVED] VBA to Promt if PDF exists and to overwrite - Close Existing File first
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2014, 03:09 AM
  6. Split data from Master Sheet to existing worksheets and overwrite data
    By vmwest in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-21-2013, 05:36 PM
  7. Overwrite existing data
    By kishoremcp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-21-2012, 09:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1