Jump to content
Sign in to follow this  

Input Box -> Excel

Recommended Posts

$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:")
Edited 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.")

Share this post

Link to post
Share on other sites

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 by kaisies

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...