473,586 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compile error Expected End Sub

1 New Member
microsoft visual basic for application : compile error Expected End Sub
Nov 11 '15 #1
2 1542
Rabbit
12,516 Recognized Expert Moderator MVP
Your thread has been moved to the vba forum.

Pretty simple error message, it's expecting end sub but it's not where it's expecting it. That's all we can say because you haven't posted any of your code.
Nov 11 '15 #2
NeoPa
32,566 Recognized Expert Moderator MVP
As Rabbit says, you need to post your code for us to help with your code. The error message explains the type of error that's occurring. It seems you need help to find where and why that is in your exact code. Without your code that would be very difficult.
Nov 12 '15 #3

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

Similar topics

3
5416
by: wwwursa | last post by:
I am trying to use the Right function in a VB6 program. I have used it used many times before in other programs. When I press the enter key after entering the code line, the word "Right" turns into "RIGHT" in all capital letters The line is LongText = RIGHT(LongText, 2) I have used Option Explicit to make sure all variables are...
5
15175
by: iheartvba | last post by:
Hi Everyone, I keep on getting an error saying Compile Error: Expected Case in my (MS Access) VBA What I was trying to do was to do a DSUM function for a Table where the criteria was coming from another table, I later found the criteria needs to be from within the domain table I had set DSUM function (makes sense). I then when to Query Bulder to...
1
8999
by: darrel | last post by:
Hello, i need you help, can someone whats the cause of getting an error of Expected function or variable, its like this i have a function code in a module and call it on my main form.. here my code: Function DTR7() Dim rs As New ADODB.Recordset Dim cnn As New ADODB.Connection Dim x As Integer frmMain.Command2.Visible = True ...
1
5143
by: kieran04 | last post by:
every time i run this program in VBE i keep getting the message 'Compile Error: expected array' for the two bold lines underneath, please help? Public Function KnotsToKmPerHr(knots As Double) As Double Dim Km As Double KNOTS_TO_KM = 1.852 Km = knots * KNOTS_TO_KM KnotsToKmPerHr = Km
2
16416
by: rocky102 | last post by:
I am a novice old timer who enjoys fooling around with excel, I copied this macro from and old computer and wanted to use it one a new one I got. Its supposed to draw a line across a row when there is a change from one number to another. When I try to use it I get this error Compile Error Expected End Sub Help please.
1
15094
by: Dorota Prywata | last post by:
Hi, I need help with VBA Macro for Auto-filter to high lite a header plp advice as per below course a I got Compile error: Expected End Sub ? Sub Macro1() Function FilterOn(myCell As Range) As Boolean On Error Resume Next With myCell.Parent.AutoFilter With .Filters(myCell.Column - .Range.Column + 1)
2
6548
by: engrlorie | last post by:
I am a newbie in programing and is currently designing a program using VB6 with access 03 database. Unfortunately, I am stuck with the error. Please help me.. can't decipher the problem myself. Scenario is I have 4 tables (lightinfo, location, characteristics, and pics). They are connected through National ID from lightinfo. strQuery =...
4
8452
by: Lindsay Bradley | last post by:
I have code built into a form in Access and everytime I try to open the form it gives me a Compile error: Expected array message and then highlights the word Left. I did not create this program and know very little about VBA but have been given the responsibility to take over this program. Please help I'm desperate! Private Sub Form_Open(Cancel...
1
2481
by: Tesplund | last post by:
I am using VB to create a code that will save a copy, send it via outlook then delete the copy it saved. I want this to be via command button but am not picky as long as it's as easy as the comman button. The code I have is Sub Mail_workbook_Outlook_2() ' Works in Excel 2000, Excel 2002, Excel 2003, Excel 2007, Excel 2010, Outlook 2000, Outlook...
1
1420
by: laurabbface | last post by:
I keep getting the following error: Compile error: Expected End Sub Can someone show me what I'm doing wrong & how to rewrite? Private Sub Exit_Click() DoCmd.GoToRecord , , acNewRec Function User_Form_macro() On Error GoTo User_Form_macro_Err
0
7912
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8202
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6614
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.