martmeister Posted July 23, 2009 Posted July 23, 2009 Hey guys can you help me with this script.. Here is a part of the code: #include <Excel.au3> run ("C:\Program Files\Microsoft Office\EXCEL.exe") ;opens excel Send("C:\Documents and Settings\HopperVS2.xlsm") $oExcel.Run("FileHOP7") When the script get to running the macro it errors out with: $oExcel.Run("FileHOP7") $oExcel^ERROR error: expected a "=" operator in assignment statement .....Where is wanting me to put the = because i have never had this problem?? Thanks everyone for input!
Beege Posted July 23, 2009 Posted July 23, 2009 (edited) You are using Send() wrong. Send() is for sending Keystrokes. What are you trying to do? Edited July 23, 2009 by bchris01 Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator
reb Posted July 23, 2009 Posted July 23, 2009 Hey guys can you help me with this script..Here is a part of the code:#include <Excel.au3>run ("C:\Program Files\Microsoft Office\EXCEL.exe") ;opens excelSend("C:\Documents and Settings\HopperVS2.xlsm")$oExcel.Run("FileHOP7")When the script get to running the macro it errors out with:$oExcel.Run("FileHOP7")$oExcel^ERRORerror: expected a "=" operator in assignment statement.....Where is wanting me to put the = because i have never had this problem??Thanks everyone for input!Try thisGlobal $bBook = "C:\Documents and Settings\HopperVS2.xls" ; I assume this is the book you want to open $oExcel = _ExcelBookOpen($bBook)WinWait("Microsoft Excel - HopperVS2.xls")$oExcel.Run("FileHOP7") ; I assume this is the macro you want to runREB MEASURE TWICE - CUT ONCE
martmeister Posted July 23, 2009 Author Posted July 23, 2009 You are using Send() wrong. Send() is for sending Keystrokes. What are you trying to do?I was using a partial amount of code and didn't include the others lines
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now