Computer Hope

Software => Computer software => Topic started by: StArawn on August 23, 2010, 12:15:05 PM

Title: mixing batch and macro for excel
Post by: StArawn 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.
Title: Re: mixing batch and macro for excel
Post by: soybean 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.