+ Reply to Thread
Results 1 to 2 of 2

Macro to run Bat file from Excel

  1. #1
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Macro to run Bat file from Excel

    Hello,

    I am copying cells from excel to notepad and rename the extension to *.bat.

    I fact it regards commands thaht I need to generate and I was wondering if I could create a macro to generate all the bat file directely from Excel...

    It seems really hard to do but I give a try in that forum as I got some great help in the past.

    So the idea would be to copy each cell (windows command) I have in the cells (G2,G3,G4,G5,G6,G7,G8,G9,G10,G11,G12) have create a bat file for each.

    Example: I have in the G2 cell: C:\dir
    --> I would need to copy that cell into a notepad and rename the extension as *.bat.. at least that's what I am doing manually for the moment.

    If you need further info, please let me know.
    Many thanks,
    Graig

  2. #2
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Macro to run Bat file from Excel

    give this a go , it will go trough G2 till G12 and create 10 bat files with the name in those cells
    each bat file will also contain the text that is in the cell that was used to name the file
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved , to mark your thread as Solved select Thread Tools and click Mark thread as Solved.

    I can't read the mind of my wife so then I get picture but no sound .... and then I mostly get the idea, same goes here picture your outcome and I get the idea.

+ 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. Replies: 0
    Last Post: 10-02-2013, 01:47 AM
  2. Converting excel 2003 file ext macro file-save code to reflect excel 2007 exts
    By pmanoloff in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2013, 12:17 PM
  3. macro to open, copy paste from existing excel file to a new blank file
    By 2blessed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2012, 06:05 PM
  4. Replies: 3
    Last Post: 05-03-2012, 10:56 AM
  5. macro prompts immediately to open a file once the Excel file with the macro is opened
    By jhmayor03 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-03-2012, 10:00 AM

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