ERROR: The Following Variable Name Contains an illegal character

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Ram
Posts: 16
Joined: 13 Jan 2021, 10:56

ERROR: The Following Variable Name Contains an illegal character

Post by Ram » 15 Jan 2021, 11:13

Help, i got a problem ( in the image i attached for details ), can anyone help me with this? Thankyou. Below is my script


Code: Select all

oExcel := ComObjActive("Excel.Application")
oExcel.Sheets("KAS DES").Activate
oExcel.Range("C2").Select




C2KasAkun :=	oExcel.Range("C2").Value 
F2KasDeb  :=	oExcel.Range("F2").Value 

if WinExist("contoh.xlsx")
    WinActivate

sleep 2000
oExcel := ComObjActive("Excel.Application")
oExcel.Sheets("BJ-01").Activate

	oExcel.Range("D4").Value := %C2KasAkun%
	oExcel.Range("E3").Value := %F2KasDeb%
Attachments
image_2021-01-15_231155.png
image_2021-01-15_231155.png (122.82 KiB) Viewed 376 times
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: ERROR: The Following Variable Name Contains an illegal character

Post by BoBo » 15 Jan 2021, 11:27

Code: Select all

	oExcel.Range("D4").Value := %C2KasAkun%		; false
	oExcel.Range("E3").Value := F2KasDeb		; correct
HTH.
Post Reply

Return to “Ask for Help (v1)”