i'm really knew to AHK and I use bits and pieces of code that I find to get what I need done. I just don't understand the language involved to get the outcome that i seek. any help is greatly appreciated.
Code: Select all
NumpadAdd::
Gui, Destroy
Gui, Add, text, , Enter #:
Gui, Add, Edit, vNum
Gui, Add, Button, default, OK
Gui, Show
Return
GuiClose:
ButtonOK:
Gui, Submit,
Xl := ComObjCreate("Excel.Application") ;create handle
Xl.Workbooks.Open("C:\Users\Maherna\Desktop\CR.xlsx")
Xl.Visible := False
Loop
{
if(Xl.Range("B" . A_Index).Value = "")
{
Xl.Range("B" . A_Index).Value:= Num
break
}
}
Xl.ActiveWorkbook.save()
Xl.ActiveWorkbook.close()
return
^!NumpadAdd::ExitApp