Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default VBA to make key entries into application

Hello,

I'd love to be able to take data from an Excel worksheet
and place it ("key")into another application. For example:

Column A Column B Column C
Name Address Phone

Bob 123 Main 612-123-4567
Joe 456 Elm 555-123-9876



The mechanics would be enter A2 data, go to new field in
destination application, enter B2 data, go to new field,
enter C2 data, click SAVE in destination application,
click NEW, and start process over for row 3 (Joe)....

I know some VBA, and a little about .bat files. Any help
getting me started would be greatly appreciated

TIA!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default VBA to make key entries into application

KENNY,
What is the "destination application" ?

NickHK

"KENNY" wrote in message
...
Hello,

I'd love to be able to take data from an Excel worksheet
and place it ("key")into another application. For example:

Column A Column B Column C
Name Address Phone

Bob 123 Main 612-123-4567
Joe 456 Elm 555-123-9876



The mechanics would be enter A2 data, go to new field in
destination application, enter B2 data, go to new field,
enter C2 data, click SAVE in destination application,
click NEW, and start process over for row 3 (Joe)....

I know some VBA, and a little about .bat files. Any help
getting me started would be greatly appreciated

TIA!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default VBA to make key entries into application

Hi Kenny

Here's a way of typing:

Sub test()
Dim R As Long
Dim C As Long
Dim V As Long
V = Shell("C:\WINDOWS\NOTEPAD.EXE", 1)
DoEvents
Application.Wait Now + TimeSerial(0, 0, 1)
For R = 1 To 2
For C = 1 To 3
Application.SendKeys Cells(R, C).Value
Application.SendKeys "{TAB}"
Next
Application.SendKeys "{RETURN}"
Next
End Sub

Note that this is /not/ a good way to automate one application from another.
Sendkeys is like typing blindfolded and can be used reliably only in
strictly controlled environments.

Can this "another application" import files ? Looks like some database
thing, it should handle an import from Excel or from a textfile.

HTH. Best wishes Harald

"KENNY" skrev i melding
...
Hello,

I'd love to be able to take data from an Excel worksheet
and place it ("key")into another application. For example:

Column A Column B Column C
Name Address Phone

Bob 123 Main 612-123-4567
Joe 456 Elm 555-123-9876



The mechanics would be enter A2 data, go to new field in
destination application, enter B2 data, go to new field,
enter C2 data, click SAVE in destination application,
click NEW, and start process over for row 3 (Joe)....

I know some VBA, and a little about .bat files. Any help
getting me started would be greatly appreciated

TIA!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default VBA to make key entries into application

It is a propietary (still in development) office
management system (web based). I think the steps are Copy
from a cell in Excel, go to destination app, paste, and so
on ..... back and forth.

Thanks.


-----Original Message-----
KENNY,
What is the "destination application" ?

NickHK

"KENNY" wrote in

message
...
Hello,

I'd love to be able to take data from an Excel worksheet
and place it ("key")into another application. For

example:

Column A Column B Column C
Name Address Phone

Bob 123 Main 612-123-4567
Joe 456 Elm 555-123-9876



The mechanics would be enter A2 data, go to new field in
destination application, enter B2 data, go to new field,
enter C2 data, click SAVE in destination application,
click NEW, and start process over for row 3 (Joe)....

I know some VBA, and a little about .bat files. Any

help
getting me started would be greatly appreciated

TIA!



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default VBA to make key entries into application

Thanks for the response.... Unfortunately, no -- it can't
be imported (yet).



-----Original Message-----
Hi Kenny

Here's a way of typing:

Sub test()
Dim R As Long
Dim C As Long
Dim V As Long
V = Shell("C:\WINDOWS\NOTEPAD.EXE", 1)
DoEvents
Application.Wait Now + TimeSerial(0, 0, 1)
For R = 1 To 2
For C = 1 To 3
Application.SendKeys Cells(R, C).Value
Application.SendKeys "{TAB}"
Next
Application.SendKeys "{RETURN}"
Next
End Sub

Note that this is /not/ a good way to automate one

application from another.
Sendkeys is like typing blindfolded and can be used

reliably only in
strictly controlled environments.

Can this "another application" import files ? Looks like

some database
thing, it should handle an import from Excel or from a

textfile.

HTH. Best wishes Harald

"KENNY" skrev i

melding
...
Hello,

I'd love to be able to take data from an Excel worksheet
and place it ("key")into another application. For

example:

Column A Column B Column C
Name Address Phone

Bob 123 Main 612-123-4567
Joe 456 Elm 555-123-9876



The mechanics would be enter A2 data, go to new field in
destination application, enter B2 data, go to new field,
enter C2 data, click SAVE in destination application,
click NEW, and start process over for row 3 (Joe)....

I know some VBA, and a little about .bat files. Any

help
getting me started would be greatly appreciated

TIA!



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default VBA to make key entries into application

More....

for most applications you can use "getObject()" to return a running
instance. Not possible with IE so here's a way to do the same thing.
In one way it's an improvement on GetObject since you can select which
instance you want to work with, based on the URL of the currently-loaded
page.

Tim.



Sub test2()
Dim o

Set o = GetIE("http://www.yahoo.com")

If Not o Is Nothing Then
MsgBox o.document.body.innerHTML
Else
MsgBox "No Yahoo page found"
End If

End Sub


Function GetIE(sLocation As String) As Object

Dim objShell As Object, objShellWindows As Object, o As Object
Dim sURL As String
Dim retVal As Object

Set retVal = Nothing
Set objShell = CreateObject("Shell.Application")
Set objShellWindows = objShell.Windows

For Each o In objShellWindows
sURL = ""
On Error Resume Next
'check the URL and if it's the one you want then
' assign it to the return value
sURL = o.document.Location
On Error GoTo 0
If sURL Like sLocation & "*" Then
Set retVal = o
Exit For
End If
Next o

Set GetIE = retVal

End Function




"KENNY" wrote in message
...
It is a propietary (still in development) office
management system (web based). I think the steps are Copy
from a cell in Excel, go to destination app, paste, and so
on ..... back and forth.

Thanks.


-----Original Message-----
KENNY,
What is the "destination application" ?

NickHK

"KENNY" wrote in

message
...
Hello,

I'd love to be able to take data from an Excel worksheet
and place it ("key")into another application. For

example:

Column A Column B Column C
Name Address Phone

Bob 123 Main 612-123-4567
Joe 456 Elm 555-123-9876



The mechanics would be enter A2 data, go to new field in
destination application, enter B2 data, go to new field,
enter C2 data, click SAVE in destination application,
click NEW, and start process over for row 3 (Joe)....

I know some VBA, and a little about .bat files. Any

help
getting me started would be greatly appreciated

TIA!



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make Excel application GUI look better? cfman Excel Discussion (Misc queries) 1 March 26th 07 11:48 PM
VBA: Make Excel the active application Gaetan Excel Discussion (Misc queries) 0 March 19th 07 05:57 PM
Make Excel a runtime application Wylie C Excel Programming 3 February 14th 05 05:53 PM
How to make Excel the Top-Most application programmatically? R Avery Excel Programming 2 August 3rd 04 12:04 PM
Make Worksheet Event available application-wide Bradley C. Hammerstrom Excel Programming 2 May 21st 04 07:31 PM


All times are GMT +1. The time now is 11:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"