dpk Posted February 1, 2012 Share Posted February 1, 2012 (edited) Hi Peeps, Can someone help this noob please. I have a simple script below which opens a tab delimited text file in Excel. My problem is that I would like to import a macro "Overviewfile.bas" and then run it on the excel file that has just been opened. I have experimented but got nowhere. Can someone help me create these extra lines of code to accomplish this. #include <Excel.au3> $file="FView_WO_Dump_31January2012.txt" ; tab delimited text file $macro_location = "MacrosOverviewFile.bas" ;Macro I want to run $oExcel = _ExcelBookOpen($file) If @error = 1 Then MsgBox(0, "Error!", "Unable to Create the Excel Object!") Exit ElseIf @error = 2 Then MsgBox(0, "Error!", "File does not exist!") Exit EndIf Import MACRO Run MACRO Edited February 1, 2012 by dpk Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now