-
Oct 19th, 2017, 10:29 AM
#1
Thread Starter
New Member
Compile Error: Expected End Sub
Hi there, this is my first post so apologies in advance for the n00b questions.
I have a client who is getting this error every time he gets a calendar invite. Im not too familiar with VBS so Im hoping somebody here can make light of this?
Thank you.
-
Oct 19th, 2017, 11:09 AM
#2
Re: Compile Error: Expected End Sub
SM
You are missing a line of code
Code:
Private Sub CalendarItems_ItemAdd(ByVal Item As Object)
.. code
If .. Then
.. code
End If
End Sub
Private Sub CalendarItems_ItemChange(ByVal Item As Object)
End Sub
Spoo
-
Oct 19th, 2017, 11:39 AM
#3
Re: Compile Error: Expected End Sub
Originally Posted by SMunizCC
Hi there, this is my first post so apologies in advance for the n00b questions.
I have a client who is getting this error every time he gets a calendar invite. Im not too familiar with VBS so Im hoping somebody here can make light of this?
Thank you.
I don't see how a client can be getting that error...did it actually build with error? In other words you are saying that a client is running your program and getting that error when the error you are showing us would prevent the program from compiling\building. Therefore it seems impossible the client can be getting that error. It is a program development error.
Last edited by TysonLPrice; Oct 19th, 2017 at 11:44 AM.
Please remember next time...elections matter!
-
Oct 19th, 2017, 11:42 AM
#4
Re: Compile Error: Expected End Sub
Originally Posted by TysonLPrice
I don't see how a client can be getting that error...did it actually build with error?
I know what you mean, but OP might not .. maybe you could elaborate
Spoo
-
Oct 19th, 2017, 11:47 AM
#5
Re: Compile Error: Expected End Sub
It looks like it is an Outlook VBA macro embeded in the CalInvite... or in something that's running on their machine. It's not compiled code. Probably should move this thread to the Office Dev section.
-tg
-
Oct 19th, 2017, 11:54 AM
#6
Re: Compile Error: Expected End Sub
OK...I stand corrected but:
How can anything run with a compiler error? Is it something that compiles at run-time like some of the the early third generation languages?
Please remember next time...elections matter!
-
Oct 19th, 2017, 12:02 PM
#7
Re: Compile Error: Expected End Sub
But it isn't running... it's throwing an error... VBA Macro code files aren't compiled until they are executed, so it's very easy to botch one up, save it and never know until it goes to be executed... the VBA interpreter loads it up, attempts to compile it to run it, and viola! an error happens...
That's what is happening here. He's got a botched piece of VBA code in an Outlook macro that runs when a calendar invite arrives. When one does, Outlook attempts to run the code, but can't because it's broken.
-tg
-
Oct 19th, 2017, 12:07 PM
#8
Re: Compile Error: Expected End Sub
"But it isn't running... it's throwing an error"
Thanks!
Please remember next time...elections matter!
-
Oct 19th, 2017, 02:26 PM
#9
Re: Compile Error: Expected End Sub
Originally Posted by techgnome
It looks like it is an Outlook VBA macro embeded in the CalInvite... or in something that's running on their machine. It's not compiled code. Probably should move this thread to the Office Dev section.
-tg
Good call
The MsgBox clearly (well, if you squint) is labelled Visual Basic for Applications
-
Oct 19th, 2017, 02:33 PM
#10
Re: Compile Error: Expected End Sub
Originally Posted by Spooman
SM
You are missing a line of code
Code:
Private Sub CalendarItems_ItemAdd(ByVal Item As Object)
.. code
If .. Then
.. code
End If
End Sub
Private Sub CalendarItems_ItemChange(ByVal Item As Object)
End Sub
Spoo
I would have said he had an extra line of code. Remove the "Private Sub CalendarItems_ItemChange(ByVal Item As Object)" line.
-
Oct 19th, 2017, 03:30 PM
#11
Re: Compile Error: Expected End Sub
Originally Posted by passel
I would have said he had an extra line of code. Remove the "Private Sub CalendarItems_ItemChange(ByVal Item As Object)" line.
And the winner is .....
-
Oct 19th, 2017, 04:43 PM
#12
Re: Compile Error: Expected End Sub
Originally Posted by Spooman
And the winner is .....
The one with the eagle eyes. I couldn't read a dang thing on that screenshot, not with high confidence anyway
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|