Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: mixing batch and macro for excel  (Read 2421 times)

0 Members and 1 Guest are viewing this topic.

StArawn

  • Guest
mixing batch and macro for excel
« on: August 23, 2010, 12:15:05 PM »
on a computer running windows xp, I'm trying to do the following:
have Excel open workbook1 and run a macro in the personal workbook. workbook1 will be a different file each time (the macro only formats it). I can use a batch file to rename the workbook to have a generic name, and to open it in excel, but I can't get it to run the macro. I tried using sendkeys in access and again could open the file but not run the macro. I really don't know VB, but I had found a code for VB which would open the excel file and run a macro, but I could only get it to work if the macro was inside the workbook, it would say it couldn't find it if i had it in the personal workbook). I'm open to trying any combination now in order to automate a process of formatting the new workbooks each week (only one worksheet in the workbook).
p.s. I hope I have the right forum, as I wasn't sure whether applications, or dos, or programming would be the right forum and knew better than to post it in all of the forums.
Thanks.

soybean



    Genius
  • The first soybean ever to learn the computer.
  • Thanked: 469
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Re: mixing batch and macro for excel
« Reply #1 on: August 24, 2010, 09:44:14 AM »
I may not be able to provide any real help to you on this but I think we need to know what version of Excel you are using.