Results 1 to 2 of 2
  1. #1
    TSSIn is offline Novice
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    1

    vb to close command window

    I am trying to run a batch file that copies of file to a local folder. It executes but it does not close the command window.

    my code is: Shell ("cmd /C C:\Data\Database\TMS_Shipment_upload\TMS_Shipment_ Upload_Get_Site_Data.bat")



    The batch file code is: P
    Powershell /c Copy-Item -Path \\rccearprd03\F$\Data\Project\'TMS Shipment Upload'\TMS_Shipment_Upload_Site_Data.accdb -Destination C:\Data\Database\TMS_Shipment_upload

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,604
    Does this help https://social.technet.microsoft.com...ipt-completion

    AFAIK, don't need command window to run a bat. https://datatofish.com/vba-batch-fil...tch%20file.%20

    You are using VBA to call Shell to run a bat that copies a file?

    Why not use Access VBA FileCopy() function?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 03-30-2017, 03:20 PM
  2. Disable close button in appliction window
    By Jen0dorf in forum Access
    Replies: 4
    Last Post: 08-20-2016, 03:44 PM
  3. How to disable save/close window in form
    By Kivan in forum Access
    Replies: 2
    Last Post: 08-16-2012, 02:52 AM
  4. Close window error on certain client computer
    By DavidLP in forum SharePoint
    Replies: 0
    Last Post: 05-23-2012, 11:53 AM
  5. Replies: 1
    Last Post: 11-28-2011, 04:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums