Solved

entering input from VB forms to excel

Posted on 1998-10-17
3
128 Views
Last Modified: 2010-04-30
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?
0
Comment
Question by:okuda
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 50 total points
ID: 1440394
Use the SendKeys to position the cursor in Excel. Send an F5 followed by the cell address and <Enter>.

M

0
 

Author Comment

by:okuda
ID: 1440395
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
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1440396
Leave off the parens & $'s on ($D$4) - feed as D4...

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now