Solved

help with activex compiling

Posted on 2002-04-08
2
177 Views
Last Modified: 2010-05-02

i am trying to compile an activex control but i get this error...

"compile error

private object modules cannot be used in public object modules as parameters or return types for public procedures, as public data members, or as fields of public user defined types."

the problem seems to be with this procedure.

Public Sub ControlsVisible(Txtctrl, LblCtrl As Control)

lblDisc.Visible = False
lblRoller.Visible = False
lblBearing.Visible = False
lblBlock.Visible = False
lblGear.Visible = False
lblDriveShaft.Visible = False
lblChain.Visible = False

TxtDisc.Visible = False
TxtRoller.Visible = False
TxtBearing.Visible = False
TxtBlock.Visible = False
TxtGear.Visible = False
TxtDriveShaft.Visible = False
TxtChain.Visible = False

Txtctrl.Visible = True
Txtctrl.Top = 2505
Txtctrl.Left = 1575

LblCtrl.Visible = True
LblCtrl.Top = 2025
LblCtrl.Left = 75

End Sub


What am i doing wrong here? I put the same code in a standard .exe project and it works ok..

0
Comment
Question by:jhaigh
2 Comments
 
LVL 5

Accepted Solution

by:
rkot2000 earned 100 total points
ID: 6925528
try to use :

Public Sub ControlsVisible(Txtctrl As object, LblCtrl As object)

or

Public Sub ControlsVisible(Txtctrl As variant, LblCtrl As variant)

0
 
LVL 1

Expert Comment

by:soferstam
ID: 6935464
The sulotion by rkot2000 will work
The error is that your Txtctrl, LblCtrl  are already placed on the same control...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Put text in a picture ASP.NET C# 2 61
TT Auto Dashboard 13 95
Help with retrieving partial value from a column using VB.NET 4 51
Advice in Xamarin 21 97
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question