I have a little question about handling Excel with AHK. Is it possible to paste a variable directly into a cell?I know I can pass the value of the variable to the clipboard and paste, but if you don't prefer, can you paste a variable directly?
I tried and I couldn't (Message error: Unable to set the Paste property of the Worksheet class)
Code: Select all
Var_Call=1010101
xlApp := ComObjCreate("Excel.Application")
xlAppDown := -4121
xlApp.Visible := true
xlApp.DisplayAlerts := False
oxWorkbook := xlApp.Workbooks.Open("C:\Temp\Some_Plan.xlsm")
oExcel.Range("A1").Select
oxWorkbook.ActiveSheet.Paste := Var_Call