Jump to content
SkysLastChance

$oExcel.Active.Range with variable getting a syntax [Solved] error.

Recommended Posts

I have been using this for awhile and today it stopped working.

#include <Excel.au3>

Global $vTopCount = 1
Global $vTopCount = 1

$oExcel = _Excel_Open()
_Excel_BookNew($oExcel, 2)
$oExcel.Activesheet.Range('A'& $vTopCount:'G'& $vTopCount).Interior.ColorIndex = 50

 The only thing I can really think of that I changed is that I switched from the light version to full version of Scite.

How can I make this work again?

"C:\Users\username\Desktop\color test.au3"(9,42) : error: syntax error
$oExcel.Activesheet.Range('A'& $vTopCount:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

 

Edited by SkysLastChance

Life's simple. You make choices and you don't look back.

Share this post


Link to post
Share on other sites

There is a typo in that line :

$oExcel.Activesheet.Range('A'& $vTopCount & ':G' & $vTopCount).Interior.ColorIndex = 50

 

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...