+ Reply to Thread
Results 1 to 12 of 12

Macro Modification (If file is not present then msgbox popup that doesnt close)

  1. #1
    Registered User
    Join Date
    05-10-2020
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    92

    Macro Modification (If file is not present then msgbox popup that doesnt close)

    Hello Sir\Mam,

    Please Login or Register  to view this content.

    This macro works perfect
    The above macro looks for file that it is present or not & if any of the files are not present then this macro popups a msg box stating the file name & that msgbox popup will not closed until that file is not located in the path metioned in the macro
    So if i run this macro then at any cost i have to put the file to the path mentioned in the macro Or the file will be located in the path mentioned in the macro
    So if all the file is present then this line should be excecuted
    Please Login or Register  to view this content.
    So plz help me for the same


    Thnx

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    I thought we solved this? Why did you post again, may I ask? is this not related to this?

    https://www.excelforum.com/excel-pro...vba-macro.html

  3. #3
    Registered User
    Join Date
    05-10-2020
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    92

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    Sir i have 16 macros to run back to back &
    Please Login or Register  to view this content.
    this is in the middle so if i run this macro then excel will be closed & i will unable to run all that 16 macros at once
    So i am just making an adjustments
    Please Login or Register  to view this content.
    I wil run all 16 macros at once & this
    Please Login or Register  to view this content.
    is STEP2.xlsb , so i will not be able to run all 16 macros at once, so i have a logic to solve this problem & i am doing the same sir

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    based on what you have said in your first post of this thread, and this now:

    Quote Originally Posted by quirkybox View Post
    I wil run all 16 macros at once & this
    Please Login or Register  to view this content.
    is STEP2.xlsb , so i will not be able to run all 16 macros at once, so i have a logic to solve this problem & i am doing the same sir
    ....I personally am not sure what you are asking for help with.

    it sounds to me that the workbook called STEP2.xlsb or some routine in it is the problem you are having. true? if that is true, you haven't really said why it is the problem. why is it stopping the other macros from being run? and just out of curiosity, why are you running 16 routines in a row? are they all doing the same thing, or similar things?
    Last edited by vba_php; 08-15-2020 at 07:50 PM.

  5. #5
    Registered User
    Join Date
    05-10-2020
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    92

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    I need help in modifying the below macro
    Please Login or Register  to view this content.
    This macro works perfect
    The above macro looks for file that it is present or not & if any of the files are not present then this macro popups a msg box stating the file name & that msgbox popup will not closed until that file is not located in the path metioned in the macro
    So if i run this macro then at any cost i have to put the file to the path mentioned in the macro Or the file will be located in the path mentioned in the macro
    So if all the file is present then this line should be excecuted
    Please Login or Register  to view this content.
    So plz help me for the same


    I am not having any issue with anything Sir , Everything is working perfect
    I just need to modify the macro As per my needs (for betterment of the process)

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    I'm not trying to make things difficult but everything you just said can probably be done but you did not include the code that's necessary in order to see what you're currently doing and what you want to have done. For instance, you telling me that you want the pop up a message box for that you do not get the code you posted as no message box thing in it. And I'm still a little unclear about what what the kill task statement has to do with this. I understand that you're killing me application and that it's probably called from the macro code is that correct?

  7. #7
    Registered User
    Join Date
    05-10-2020
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    92

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    I haven't told u bro that i need popup
    don't mix the problems, u r getting confused

    I agree this is the solution to close excel
    Please Login or Register  to view this content.
    & that problem is solved

    This is different story leave all the things and only see the current problem


    I need help in modifying the below macro
    Please Login or Register  to view this content.
    This macro works perfect
    The above macro looks for file that it is present or not & if any of the files are not present then this macro popups a msg box stating the file name & that msgbox popup will not closed until that file is not located in the path metioned in the macro
    So if i run this macro then at any cost i have to put the file to the path mentioned in the macro Or the file will be located in the path mentioned in the macro
    So IF ALL THE FILES ARE PRESENT THEN THIS MACRO DOES NOTHING & I WANT IF ALL THE FILES ARE PRESENT THEN THE BELOW LINE SHOULD BE EXECUTED
    Please Login or Register  to view this content.
    SO ADD THIS LINE IN THIS MACRO (IF ALL THE FILES ARE PRESENT THEN THIS LINE WILL BE EXECUTED )


    So plz help me for the same
    Last edited by quirkybox; 08-15-2020 at 08:52 PM.

  8. #8
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    OK, so I'd like to show you what I did. I ran the code to see the message appear and it worked fine. It did NOT show the message box if ALL FILES WERE FOUND. I ran it again when the 1 file I tested it on was NOT found. and of course, the message box appeared like it should have. (see the image called "message box"). I also set breakpoints so I didn't make a mistake (see image "breakpoints"). and to further clarify, take a look at this 1 minute long video I recorded for you, to illustrate that Excel is being killed like it should:

    (mp4 file on google cloud): https://drive.google.com/file/d/1ZgL...ew?usp=sharing

    So....I don't think I'm helping you. I see no error. oh, and in case you didn't know, I've been doing this work for more than 20 years. I don't confuse very much. [wink]
    Attached Images Attached Images

  9. #9
    Registered User
    Join Date
    05-10-2020
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    92

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    Bro u already Helped me ,

    Thnx Alot Bro for helping me in solving this problem Sir

    Please Login or Register  to view this content.
    This was what i wanted & this macro does the same what i wanted

    Chill Bro
    Thats Great Bro u understood the problem & u have a Great knowledge about vba but sometimes rarely some people get confused
    I was just trying to explain u & trying to give u the clear pricture of the same

    Have a Awesome Day,Lovely Day

  10. #10
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    so is this issue solved then? if it is, please mark it so by doing this:
    Attached Images Attached Images

  11. #11
    Registered User
    Join Date
    05-10-2020
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    92

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    Yes i putted thread as solved

  12. #12
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Macro Modification (If file is not present then msgbox popup that doesnt close)

    good luck to you! see you around here, i'm sure.

+ 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. Open & close the Active excel file by vba macro (Macro Modification)
    By quirkybox in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2020, 07:00 AM
  2. Replies: 0
    Last Post: 04-15-2019, 09:46 AM
  3. [SOLVED] Worksheet_SelectionChange Doesnt Trigger at every modification made
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2016, 11:31 PM
  4. Macro to display msgbox before close IF checkbox is ticked
    By Tombo746 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-18-2016, 09:43 PM
  5. [SOLVED] a macro that will close the workbook when a certain file in the network isnt present?
    By kjy1989 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-08-2013, 12:14 AM
  6. Macro to Disable to close workbook after opening if machine ID doesnt mactch!
    By Taislin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-11-2012, 10:07 PM
  7. How to close annoying popup windows with Excel macro?
    By KB7 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-27-2012, 10:35 AM

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