Solved

additional settings

Posted on 1998-06-10
3
243 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
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
swilt earned 30 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

840 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