Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / ActiveX Controls / February 2006

Tip: Looking for answers? Try searching our database.

dropdown properties for activex control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mikeslaptop - 25 Feb 2006 16:38 GMT
i inserted a microsoft activex control onto my access form.
problem - when i enter vba code for that object, the automatic dropdown
selections for appopriate properties arent there for this object.
ie// i inserted a spreadsheet, then started typing code for it.
spreadsheet1. (dot)
 but the items presented to me did not include such valid items as 'cells,
columns, etc...'

someone told me to be sure i had installed the 'reference' for that control.
i added a lot of references, particularly for the excel items, but still not
item-dropdowns that are correct.

what should i do?  i need a valid list of properties and methods
Stephen Lebans - 25 Feb 2006 19:26 GMT
Access wraps the ActiveX control within its own object interface. You need
to unwrap this wrapper to expose the custom props and methods you created.
For Intellisense to work you have 2 options.

Note:
Instead of declaring as type Object as I have in the air code below, it
should be the actual name of the interface exposed by the ActiveX control.
For example if you had inserted the ImageXpress ActiveX control you would do
something like:
Dim obj As ImagXpress

1) In the General Declaration area of the Form's Class module declare  a
variable of type Object.
Dim obj as Object
In the Form's Load event do something like:
set obj = Me.MyActiveX.Object

Now when you want to access your ActiveX control just go through the
"obj" variable.

In the Form's Unload event don't forget to:
set obj = Nothing

or

2) When you are referencing your ActiveX control add the Object property
between your object and its properties.
Me.MyActiveX.Object.SomeProperty

Signature

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

>i inserted a microsoft activex control onto my access form.
> problem - when i enter vba code for that object, the automatic dropdown
[quoted text clipped - 9 lines]
>
> what should i do?  i need a valid list of properties and methods
mikeslaptop - 26 Feb 2006 15:57 GMT
Thanks for that. I tried it. No luck.
The closest 'as' object I could see in the dropdown when i declared the
variable as objecttype was Excel.(i had inserted an activex excel
spreadsheet)...
I did the 'dim' in the general section, and the 'set' in the subroutine.
But when I started entering code for the new variable, no smartlists at all
appeared.

in geneal area----------------------------Dim sheet1 As Excel
in top of subroutine----------------------Set sheet1 =
Me.Spreadsheet7.Object
a little further down in same subroutine---sheet1....(nothing)

I also tried the other suggestion------ me.spreadsheet7.object....(nothing)

> Access wraps the ActiveX control within its own object interface. You need
> to unwrap this wrapper to expose the custom props and methods you created.
[quoted text clipped - 38 lines]
>>
>> what should i do?  i need a valid list of properties and methods
mikeslaptop - 26 Feb 2006 16:11 GMT
hey. it worked. i installed some more references and restared access.
now when i do----dim sheet1 as------ i get 'spreadsheet' in the dropdown
then i did the set statement
now when i refer to the variable, i get an appropriate dropdown smartlist.

thanks for the help.
i guess you still have to be sure the correct reference is installed. not
sure which one it was becasue i selected a bunch of them out of frustration.

> Access wraps the ActiveX control within its own object interface. You need
> to unwrap this wrapper to expose the custom props and methods you created.
[quoted text clipped - 38 lines]
>>
>> what should i do?  i need a valid list of properties and methods
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.