Referencing to Objects

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ok my goal is this. I want to open up an object, send some information to
it, have a message popup and then reference back to the object.
This is what I have thus far:
Set ObjRefApp = GetObject("I:\Forms.xls")
ObjRefApp.Application.Visible = True
SendKeys "Information", True
MsgBox "More Information", vbDefaultButton1, "Information"
*** Here I would like to reference back to Excell***
SendKeys "MoreKeys", True

Any help on this matter would be greatly appreciated. Thankyou!
Also Please keep in mind that I have created a simplified
 
You don't say what you want from Excel. The answer depends on this. Also,
why the Sendkeys? What does the string "Information" mean to it? Where in
Excel is it going?
 
"Information" is the string which is being 'typed' into Excel by the send
keys function. The information in this instance would be typed into cell A1.
I just want to reference back to Excel when I have finished with the message
box. Then have additional information inputted into Excel. As I said
before, this is a very simplified version of the final product.

Thank-you Klatuu for the help.
 
I'm not sure the approach you are using will work. Here is some sample stuff
to use interfacing with an Excel file. You should be able to take it from
here

Private xlApp As Excel.Application 'Application Object
Private xlBook As Excel.Workbook 'Workbook Object
Private xlSheet As Excel.Worksheet 'Worksheet Object

set xlapp = excel.Application
set xlbook = xlapp.workbooks.open("I:\Forms.xls")
xlbook.worksheets(1).activate
set xlsheet = xlbook.activesheet
xlsheet.range(A1) = "Information"

xlbook.close
xlapp.quit
set xlsheet = nothing
set xlbook = nothing
set xlapp = nothing
 
Back
Top