Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Error This following variable name contains an illegal character .Value


  • Please log in to reply
4 replies to this topic
surya
  • Members
  • 3 posts
  • Last active: Nov 03 2015 06:43 AM
  • Joined: 29 Oct 2015

I have this codes

 

^t::
oWorkbook := ComObjActive("Excel.Application") ; access Workbook object
InputBox, UserInput, Input start number, , 300, 300
InputBox, UserInput2, Input end number, , 300, 300
ano = "%UserInput%"
bts = "%UserInput2%"
#include D:\ahkrb\seting.ahk
While ano < bts
{
sa := oWorkbook.Sheets(1).Range("D" ano ).Value
.....
 
but if I run it, I get this Error
Help me please


Jackie Sztuk _Blackholyman
  • Spam Officer
  • 3757 posts
  • Last active: Apr 03 2016 08:47 PM
  • Joined: 28 Feb 2012
^t::
oExcel := ComObjActive("Excel.Application") ; access Excel object
InputBox, UserInput, Input start number, , 300, 300
InputBox, UserInput2, Input end number, , 300, 300
ano := UserInput
bts := UserInput2
;~ #include D:\ahkrb\seting.ahk
While (ano < bts)
{
sa := oExcel.Sheets(1).Range("D" ano ).Value
ano++
msgbox % sa
}
return

Helping%20you%20learn%20autohotkey.jpg?d

[AHK] Version. 1.1+ [CLOUD] DropBox ; Copy [WEBSITE] Blog ; About

surya
  • Members
  • 3 posts
  • Last active: Nov 03 2015 06:43 AM
  • Joined: 29 Oct 2015

Thank you for the help. But I have tried your code and I still get Error at line 10. The following variable name contains an illegal character: ".Value". The program will exit. Is there another way?



Jackie Sztuk _Blackholyman
  • Spam Officer
  • 3757 posts
  • Last active: Apr 03 2016 08:47 PM
  • Joined: 28 Feb 2012

What version of Autohotkey do you have? msgbox % A_AhkVersion

The script I have posted works as is!

If
    you have an old version of (ahk < 1.1 )
else if
    you've modified the script I posted in anyway please post your code


Helping%20you%20learn%20autohotkey.jpg?d

[AHK] Version. 1.1+ [CLOUD] DropBox ; Copy [WEBSITE] Blog ; About

surya
  • Members
  • 3 posts
  • Last active: Nov 03 2015 06:43 AM
  • Joined: 29 Oct 2015

I have updated my AHK, I succeed run your script, but he message box that appears is empty