Queener Posted December 8, 2014 Posted December 8, 2014 (edited) $mynote = GUICtrlRead(InputBox("Special Notes:", "Please type your note:")) _Excel_RangeWrite($oWorkBook,"Score", $mynote,"D28",True) I'm trying to prompt the user to input data onto it then input that data that stored in InputBox to excel spreadsheet on cell D28. I got result as 0 on D28 instead of a message that I type. Any suggestion? I also tried $mynote = InputBox("Special Notes:", "Please type your note:") _Excel_RangeWrite($oWorkBook,"Score",GUICtrlRead($mynote),"D28",True) Edited December 8, 2014 by asianqueen Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")
Solution kaisies Posted December 8, 2014 Solution Posted December 8, 2014 (edited) Input box returns a string, ctrl read isn't needed. When ctrl read fails, it returns zero. Since you are using it on a string, not a handle, it's functioning normally. Remove ctrl read and your code will function. Edited December 8, 2014 by kaisies Queener 1
Queener Posted December 8, 2014 Author Posted December 8, 2014 thanks, I didn't notice it would be that simple. Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now