Solved

additional settings

Posted on 1998-06-10
3
231 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now