LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   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!



.



 
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 06:54 AM.

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

About Us

"It's about Microsoft Excel"