Jump to content

Recommended Posts

Posted

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!

Posted (edited)

You are using Send() wrong. Send() is for sending Keystrokes. What are you trying to do?

Edited by bchris01
Posted

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!

Try this

Global $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 run

REB

MEASURE TWICE - CUT ONCE

Posted

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

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

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...