Link to home
Start Free TrialLog in
Avatar of okuda
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
Avatar of mark2150
mark2150

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of okuda
okuda

ASKER

Could you please give me an example... I tried this but it continues to place the information into the first cell.
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
Leave off the parens & $'s on ($D$4) - feed as D4...