okuda
asked on
entering input from VB forms to excel
When the user enters specific information onto my application I need that information to be sent to a specific cell in Excel. How do I write the code fro this? I have been trying to find info on this type of problem for some time. I can get the worksheet to load and unload , even to print but I have no idea on the code to sent it to the required cell. Any answers?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Leave off the parens & $'s on ($D$4) - feed as D4...
ASKER
Here is the code that I am using. Could you tell me what I am doing wrong?
SendKeys "C:\MSOffice\YO Book Sheet.xls~"
DoEvents
AppActivate retval
SendKeys Text1.Text
Text1.Text = ""
DoEvents
AppActivate retval
SendKeys "{F5}"
DoEvents
AppActivate retval
SendKeys "($D$4)"
DoEvents
AppActivate retval
SendKeys "{Enter}", True
DoEvents
End Sub