Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default How could VBA connect with another customized application programm

The situation is that.

Right now I have the VBA code as below:

Dim test
Sub macro1()
On Error Resume Next
Dim x As Variant
If test < Empty And test < Null Then
x = test.end()
Set test = Nothing
End If
On Error GoTo 0
Set test = CreateObject("Place.interface")
End Sub

And there is also a customized appllication programm is with
title"Place". And this one a user interface that you could see the
detail progress of the data processing.

But where I could find the definition of the object "Place", and also
class "interface". And also the class of "test".

I am confused.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default How could VBA connect with another customized application programm

I am assuming that your other application is an ActiveX EXE or ActiveX DLL.
Open the workbook in which you want to use the application. In the VBA
Editor, go to the Tools menu and choose References. In that list, scroll
down to "Place" (which I assume is the name of the component library -- it
is the Project Name you used in VB if you created the component in VB). If
you don't find that item in the list, close Excel, go to the Windows Start
menu, choose Run and enter the following and press OK:

RegSvr32 "C:\Some\Path\Here\Place.dll"

or whatever the complete file name of the Place component happens to be.
That will register the components with Windows. Then open Excel, go to VBA,
then the Tools menu and then References. Find "Place" in the list and check
it.

Now, you need to declare a variable of the type of the creatable object in
the Place component (there may be more than one creatable object). Use a
Public variable, declared before and outside of any other procedu

Public MyPlace As Place.Interface

Then in some procedure (likely a startup or initialization procedure), set
MyPlace to an instance of the Place.Interface object:

Sub Initialize()
Set MyPlace = New Place.Interface
' more code as needed
End Sub

To view the various objects, properties, and methods of the Place component,
open the Object Browser (F2) in VBA. In the Drop Down box that likely
displays "<All Libraries", change it to "Place" or whatever the component
name. It will show you the objects and their properties and methods, but not
any real help information. For that, you need to contact the developer of
the control.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


Now, you have a globally accessible variable, MyPlace, that you can use from
any other procedure in any module.
"Ella" wrote in message
oups.com...
The situation is that.

Right now I have the VBA code as below:

Dim test
Sub macro1()
On Error Resume Next
Dim x As Variant
If test < Empty And test < Null Then
x = test.end()
Set test = Nothing
End If
On Error GoTo 0
Set test = CreateObject("Place.interface")
End Sub

And there is also a customized appllication programm is with
title"Place". And this one a user interface that you could see the
detail progress of the data processing.

But where I could find the definition of the object "Place", and also
class "interface". And also the class of "test".

I am confused.


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
Customized Toolbars ann Excel Discussion (Misc queries) 4 September 12th 06 06:52 PM
How do you keep your toolbar customized the way you set it up? alitanna New Users to Excel 2 May 19th 06 08:20 AM
Customized Date Format Frustrated Excel Worksheet Functions 5 October 7th 05 11:30 PM
Customized Formats ABgal Excel Worksheet Functions 1 May 24th 05 11:04 PM
removing customized toolbars news Excel Discussion (Misc queries) 1 February 24th 05 03:11 PM


All times are GMT +1. The time now is 06:45 PM.

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"