+ Reply to Thread
Results 1 to 2 of 2

Vba output to a batch file

  1. #1
    Registered User
    Join Date
    04-10-2014
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Vba output to a batch file

    Hi,
    I wrote a vba script that makes a batch file in column A in excel.
    Can you please tell me how I can write out column A to a batch file.
    I don't want to do a save as since I want to keep my excel program open for other processes.
    Thanks you

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Vba output to a batch file

    Hi learner99,

    The following macro will help you get started. It creates a .bat file using text from Column 'A' (starting at row 11) in the Active Sheet. You should be able to adapt it to your needs. Also see the attached sample file which implements the macro.
    Please Login or Register  to view this content.
    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). http://www.cpearson.com/excel/DeclaringVariables.aspx

    Lewis

+ 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. Need macro that opens .txt file in excel, run macros and save file in batch
    By khalidness in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2014, 11:00 AM
  2. Replies: 0
    Last Post: 01-21-2014, 10:52 AM
  3. [SOLVED] Can't specify the folder for the output of the batch file invoked by Excel VBA
    By merthum in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2012, 09:26 AM
  4. Can't specify the folder for the output of the batch file invoked by Excel VBA
    By merthum in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2012, 07:41 AM
  5. getting vba shell command to execute batch and save output to a file
    By Mad Scientist Jr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2006, 10:10 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