Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default VB Form vs VBA UserForm problems...

I come from a VBA environment where I am used to doing things like
abstracting away UI elements like moving items in a listbox up or down
with items... into some DLL that i make with a ListOrderer class which
you use by passing references to the listbox control and all of the
up/down buttons.

Now that I am writing some things in VB6, I found that I cannot simply
just export my VBA (designed in Excel) forms and import them into VB6
Forms. Why do these form objects appear in the "Designers" portion of
the TreeView rather than the "Forms" portion.

So, I started designing a VB6 form, and hoped that it could use the
same ListOrderer class that I used in the VBA form. Unfortunately, VB6
does not use MSForms controls, but rather uses VB controls. VB
controls have different methods, properties, etc! That is one problem
I don't understand, but I can get over it. It means i'd have to design
a new ListOrderer for VB6. So I did that. Unfortunately, it gave me
an error saying that "A property or method call cannot include a
reference to a private object, either as an argument or as a return
value" when I made the arguments to the ListOrderer class VB.Listbox
and VB.Button. So i simply changed them to Object and hoped it would
work.

However, it still doesn't work because when i try to use the
ListOrderer (which is compiled in a separate DLL) in the Standard EXE
Form i am trying to make, it gives me this error again. I looked
online for some descriptions of the error and I found the following
MSDN link:

http://msdn.microsoft.com/library/de...ary/en-us/vbco...

According to this, I can't pass VB controls to DLLs PERIOD! What is
that? How do you guys abstract UI functionality like drag and drop
items between two listboxes or automatically sync'ing a form's controls
(with set tag properties) to a custom object's properties?

Any help in response to any of my questions above would be greatly
appreciated. Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default VB Form vs VBA UserForm problems...

Hi,

Now that I am writing some things in VB6, I found that I cannot simply
just export my VBA (designed in Excel) forms and import them into VB6
Forms. Why do these form objects appear in the "Designers" portion of
the TreeView rather than the "Forms" portion.


Instead of posting this to all the office development newsgroups, you
might get a better response from the Visual Basic newsgroups, such as
public.vb.controls

Regards

Stephen Bullen
Microsoft MVP - Excel

Professional Excel Development
The most advanced Excel VBA book available
www.oaltd.co.uk/ProExcelDev


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
VB Form vs VBA UserForm problems... R Avery[_2_] Excel Programming 0 April 22nd 05 12:54 AM
VB Form vs VBA UserForm problems... R Avery[_2_] Excel Programming 0 April 22nd 05 12:51 AM
userform problems [email protected] Excel Programming 0 March 7th 05 08:56 PM
userform problems [email protected] Excel Programming 0 February 16th 05 06:10 PM
userform problems [email protected] Excel Programming 0 February 13th 05 01:27 PM


All times are GMT +1. The time now is 07:15 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"