Sign in to follow this  
Followers 0
martmeister

Can you help me find the error

2 posts in this topic

Hello Guys!! :)

This is a portion of my code that is a method called 'copyt' and the cell I'm trying to receive info from is DU2.. I dont know how to much this error: "Missing separater character after keyword" goes on to say DU error..

Func copyt()

Send("{CTRLDOWN}g{CTRLUP}")

#include <Excel.au3>

$oExcel = _ExcelBookOpen("C:\Documents and Settings\lecture.xlsm")

$val = _ExcelReadCell($oExcel, DU, 2)

blah blah....

....

im basing my code off of this outline:::

#include <Excel.au3>

$oExcel = _ExcelBookOpen("path")

$val = _ExcelReadCell($oExcel, Row, Column)

If $val = 1 then

;Stuff to do

ElseIf $val = 2 Then

;Stuff to do

ElseIf $val = 3 Then

;Stuff to do

ElseIf $val = 4 Then

;Stuff to do

EndIf

Share this post


Link to post
Share on other sites



If "DU" is the cell you're trying to read, it's a string value and needs to be enclosed in quotes:

$val = _ExcelReadCell($oExcel, "DU", 2)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0