473,413 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Err: Too many arguments to 'Public Sub Close()'

I'm receiving an error messages that states:
Too many arguments to 'Public Sub Close()'.
Can someone point me in the right dircetion?


Expand|Select|Wrap|Line Numbers
  1. Public Class HelloWorld
  2.  
  3.     Private Sub btnHello_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHello.Click
  4.  
  5.         Dim vName As String
  6.         vName = txtName.Text
  7.         MsgBox("Hello World" & vName)
  8.  
  9.     End Sub
  10.  
  11.     Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
  12.  
  13.         End
  14.  
  15.     End Sub
  16.  
  17.     Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
  18.         'Declare variables
  19.         Dim vFile As String
  20.         Dim vInputString As String
  21.         Dim iInput
  22.  
  23.         'Create memory space for input file
  24.         iInput = FreeFile()
  25.  
  26.         'Pick up the file
  27.         vFile = "C:\Users\Black & Gold\Documents\School work\402 VB.zip"
  28.  
  29.         'Loop through all entries in the file
  30.         Do Until EOF(iInput)
  31.             LineInput("#iInput, vInputString")
  32.             MsgBox(vInputString)
  33.  
  34.         Loop
  35.         'Housekeeping
  36.         Close("#iInput")
  37.  
  38.     End Sub
  39. End Class
Mar 29 '08 #1
5 2484
I don't see nothing wrong here, if you are using VB 6, I thinks
Mar 29 '08 #2
I'm actually using Visual Basic 2008. Everytime I go to run it I get that error message.
Mar 29 '08 #3
lotus18
866 512MB
I'm actually using Visual Basic 2008. Everytime I go to run it I get that error message.
Where is the Public Sub Close?
Mar 30 '08 #4
Is there suppose to be one. I'm new to this?
Mar 31 '08 #5
Killer42
8,435 Expert 8TB
Is there suppose to be one. I'm new to this?
Well, see how you've got a couple of "Public Sub" declarations in there? The error message sounds as though it's saying you have one called Close and there's a problem with the parameters.

Or (I'm not familiar with this version, I use the much older VB6) perhaps this is about the built-in Close statement/method, and you just have the parameters wrong when you use it (in line 36).
Apr 1 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: yzhshi | last post by:
hello, the follow code get different result from Command line and browser that is to say ,i get the correct result from the command line,but i cant say the result from browser. IPC::RUN is...
5
by: flemming eriksen | last post by:
Dear NG. IIS5 (and II6) , ASP 3.0.; W2k, WS03. A websolution has a login-page, transaction page (just reading data), and logout-page Under heavy load I get in the IIS-Log : Too many...
6
by: WindAndWaves | last post by:
Hi Everyone, Here is another question: I run a database in Access RT in a Virtual PC environment. Every now and then I get an error: "Object Not set", which then freezes everything. Not...
1
by: laurenq uantrell | last post by:
What I'm trying to do is to re-use the values of err.number and err.description after displaying them in a MsgBox. The values seem to auto clear and not be re-usable on a second reference. For...
33
by: MLH | last post by:
I've read some posts indicating that having tons of GV's in an Access app is a bad idea. Personally, I love GVs and I use them (possibly abuse them) all the time for everything imaginable - have...
4
by: nelsonchang | last post by:
Dear all, I wrote the VB code in a "button press event" as below in which is retrieve data from SQL server and insert the data into Excel. After that, I would call Excel "subtotal" API to build a...
1
by: Allan Ebdrup | last post by:
I have the following class in C# with two constructors -------------- public class JobfolderEmailRecord { public JobfolderEmailRecord(int Id) { //code for constructor } public...
22
by: M K | last post by:
Heres my SP: ( i am trying to add more than 1 field but get the same error no matter how many i try to add, i thought i would try to insert the primary key only and work up from there but the...
0
by: TrtnJohn | last post by:
I've recently converted some VB 6 code over that used the old non-structured exception handling. I also have some .NET classes that raise custom exception classes. When the code was VB6 I used to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.