Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

additional settings

Posted on 1998-06-10
3
Medium Priority
?
257 Views
Last Modified: 2010-05-03
I have two programs with the same code and the same properties settings (project -> right mouse click). One program I have got from a cd, the other I wrote on my own. I don't see any differences between them two, but one work and the other not.
The program is:

Option Explicit

Dim n%
Private Sub Form_Load()
    n = 1
End Sub
Private Sub btnNeu_Click(Index As Integer)
  Dim h
  If n >= 10 Then Exit Sub
  Load btnNeu(n)
  btnNeu(n).Top = btnNeu(n - 1).Top + btnNeu(0).Height + 120
  btnNeu(n).Visible = True
  h = btnNeu(n).Top + btnNeu(n).Height + 120
  Height = h + Height - ScaleHeight
  n = n + 1
End Sub


Private Sub btnEntfernen_Click()
    Dim h
    If n = 1 Then Exit Sub
    n = n - 1
    Unload btnNeu(n)
    h = btnNeu(n - 1).Top + btnNeu(n - 1).Height + 120
    Height = h + Height - ScaleHeight
End Sub


Private Sub btnEnde_Click()
    End
End Sub


If I want to compile it, I get the error Message:
"Compile error, procedure declaration does not match description of event or procedure having the same name"
In fact, some programs who do work at other computers, don't work be me.
Are there any additional settings to be done. I have deinstalled and reinstalled VB. This doesn't solve it.
I use a NT4, 48MB Ram, 100 MHs Pentium with two 1GB SCSI-drives and connected to network.
thanks
Martin
0
Comment
Question by:mkdjo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
swilt earned 120 total points
ID: 1462979
Look at the Cammand Button named btnNeu its sub has an extra parameter, therefore it must be in a control array.  Set the property 'Index' for btnNeu to 0 at design time
0
 

Author Comment

by:mkdjo
ID: 1462980
I don't know what you mean. Can you please post an example.(Code)
0
 

Author Comment

by:mkdjo
ID: 1462981
Yes, I got it. Thank you very much.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses

661 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